Support » Plugin: Sessions » Bug with entries stats

  • Resolved supertomate

    (@supertomate)


    Hello Pierre

    We use a site in dev and a site in prod.
    The website sells paid content by subscription with the paidmembershipspro plugin. Our user base has over 100,000 entries.

    During the tests everything went well but we had emptied all the sessions.

    When we went into production, we noticed that in PerfOps Sessions Tools only 6000 entries were coming up. Then if in the user’s profile page it was well indicated 3 sessions, once clicked on “Manage” no statistics came up and therefore impossible to delete IPs.

    Do you think there is a limit to the number of entries?

    Before deactivating the plugin in prod a customer wrote to us that he could not connect and received the error message. However, he had only 3 active sessions (checked in his profile and in the database) whereas our limit was set to 4 simultaneous connections.

    It’s really a pity because the plugin in dev was perfectly suitable for us.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Pierre Lannoy

    (@pierrelannoy)

    Hello @supertomate … and sorry to hear you have issues with Sessions.

    I will try to understand with you what’s going on.

    First of all, Sessions (the plugin) have no limitation in terms of number of managed sessions: this plugin relies on the standard WordPress session manager. So, if you use the standard sessions mechanisms included in WordPress, it just works. It is not the case if you use alternative sessions mechanisms (like PHP sessions) but I will assume you’re not.

    Secondly, the Sessions Tools can only display the sessions for the 4000 first users. I’ve done it for (admin) performance reasons, but it can be “easily” modified if you want (see below). But, if you want to be fully efficient with the size of your users base, I suggest no using this tool and prefer using auto-termination if it’s possible…

    For the “3 vs. 4 simultaneous sessions” issue, I must admit I never saw this. If you want i get an eye on this, may be could first send me the report generated in “site health” section of your site (note: by default, all “sensitive” information are omitted in this report).

    Pierre

    PS: to change the number of displayed sessions in the Sessions Tools, you can edit the file ./wp-content/plugins/sessions/includes/system/class-session.php and replace in line 1006 (int) Option::network_get( 'buffer_limit' ) by '300000'

    Thread Starter supertomate

    (@supertomate)

    Thank you very much Pierre for your answer which clarifies some questions.

    I now have a better understanding of the problem of displaying the first 4000 users. The problem is that we can’t use auto-termination because it would force our users to reconnect every 24 hours.
    What I also understand is that the display of the admin.php?page=pose-manager&id= page cannot be displayed under these conditions. Is this correct?

    Here is the information from the report

    
    ### wp-core ###
    
    version: 5.7.2
    site_language: fr_FR
    user_language: fr_FR
    timezone: Europe/Paris
    permalink: /%category%/%year%/%monthnum%/%day%/%postname%/
    https_status: true
    multisite: false
    user_registration: 0
    blog_public: 1
    default_comment_status: closed
    environment_type: production
    user_count: 103551
    dotorg_communication: true
    
    ### wp-paths-sizes ###
    
    wordpress_path: /home/clients/aocwp2019/prod/aoc_media
    wordpress_size: 721,69 Mo (756748599 bytes)
    uploads_path: /home/clients/aocwp2019/prod/aoc_media/wp-content/uploads
    uploads_size: 9,79 Go (10509888422 bytes)
    themes_path: /home/clients/aocwp2019/prod/aoc_media/wp-content/themes
    themes_size: 12,81 Mo (13437492 bytes)
    plugins_path: /home/clients/aocwp2019/prod/aoc_media/wp-content/plugins
    plugins_size: 137,44 Mo (144120232 bytes)
    database_size: 1,24 Go (1327382528 bytes)
    total_size: 11,88 Go (12751577273 bytes)
    
    ### wp-active-theme ###
    
    name: Sage Starter Theme (AOC)
    version: 8.5.2
    author: Roots
    author_website: https://roots.io/
    parent_theme: none
    theme_features: core-block-patterns, menus, post-thumbnails, soil-clean-up, soil-nav-walker, soil-nice-search, soil-jquery-cdn, soil-relative-urls, woocommerce, title-tag, post-formats, html5, editor-style, widgets, wc-product-gallery-slider
    theme_path: /home/clients/aocwp2019/prod/aoc_media/wp-content/themes/AOC
    
    ### wp-themes-inactive (1) ###
    
    Twenty Twenty-One: version: 1.3, author: L’équipe WordPress
    
    ### wp-mu-plugins (4) ###
    
    Cosa Vostra - Disable mails & cron: version: 1.0, author: CosaVostra
    Exports AOC: version: 1.0, author: <a target="_blank" href="https://www.cosavostra.com">Cosa Vostra</a>
    mu-autoloader.php: author: (undefined), version: (undefined)
    Mu-Plugin WP Serveur: version: 1.4.03032017, author: Benoît de WP Serveur
    
    ### wp-plugins-active (39) ###
    
    Admin Columns Pro: version: 5.5.3, author: AdminColumns.com
    Admin Columns Pro - Advanced Custom Fields (ACF): version: 2.6.4, author: AdminColumns.com
    Admin Columns Pro - WooCommerce: version: 3.5.10, author: AdminColumns.com
    Advanced Custom Fields PRO: version: 5.9.7, author: Delicious Brains
    Advanced Order Export For WooCommerce: version: 3.1.9, author: AlgolPlus
    Autoptimize: version: 2.8.4, author: Frank Goossens (futtta)
    BBQ Firewall: version: 20210211, author: Jeff Starr
    CB Modal Popup with Cookie Integration: version: 1.0, author: Laurent Jacquot
    Classic Editor: version: 1.6, author: WordPress Contributors
    Co-Authors Plus: version: 3.4.8, author: Mohammad Jangda, Daniel Bachhuber, Automattic
    Custom Post Type UI: version: 1.9.2, author: WebDevStudios
    Edit Author Slug: version: 1.8.2, author: Brandon Allen
    Export Users to CSV: version: 1.1.1, author: Matt Cromwell
    Facebook for WordPress: version: 3.0.5, author: Facebook
    GA Google Analytics: version: 20210211, author: Jeff Starr
    GDPR Cookie Consent Banner: version: 2.4, author: termly
    Hide Admin Bar From Non-admins: version: 1.0, author: Stranger Studios
    Intuitive Custom Post Order: version: 3.1.3, author: hijiri
    JWT Authentication for WP-API: version: 1.2.6, author: Enrique Chavez
    Mailjet for WordPress: version: 5.2.12, author: Mailjet SAS
    Optimus: version: 1.6.1, author: KeyCDN
    Paid Memberships Pro: version: 2.5.10.1, author: Stranger Studios
    Paid Memberships Pro - Email Templates Add On (.org): version: 0.8.1, author: Paid Memberships Pro
    Paid Memberships Pro - Member History Add On: version: .3.1, author: Paid Memberships Pro
    Print-O-Matic: version: 1.7.14, author: twinpictures
    Redirection: version: 5.1.1, author: John Godley
    Taxonomy Checklist Tree: version: 1.1, author: webvitaly
    User Switching: version: 1.5.7, author: John Blackbourn & contributors
    User Verification: version: 1.0.56, author: PickPlugins
    Webqam Activity logger: version: 1.0.0, author: clopes@webqam.fr
    WooCommerce: version: 5.4.1, author: Automattic
    WooCommerce Stripe Gateway: version: 5.2.3, author: WooCommerce
    WP Crontrol: version: 1.10.0, author: John Blackbourn & crontributors
    WP Extended Search: version: 2.0.2, author: 5um17
    WP Maintenance Mode: version: 2.4.0, author: Designmodo
    WP Missed Schedule Posts: version: 1.1, author: newvariable
    WPS Bidouille: version: 1.22, author: WPServeur, NicolasKulka, Benoti, wpformation
    WPS Hide Login: version: 1.8.5, author: WPServeur, NicolasKulka, wpformation
    Yoast SEO: version: 16.6.1, author: Team Yoast
    
    ### wp-plugins-inactive (5) ###
    
    Enable jQuery Migrate Helper: version: 1.3.0, author: The WordPress Team
    Jetpack: version: 9.8.1, author: Automattic
    Loggedin - Limit Active Logins: version: 1.3.1, author: Joel James
    Sessions: version: 2.3.0, author: Pierre Lannoy
    WooCommerce Shipping & Tax: version: 1.25.15, author: WooCommerce
    
    ### wp-media ###
    
    image_editor: WP_Image_Editor_Imagick
    imagick_module_version: 1690
    imagemagick_version: ImageMagick 6.9.10-23 Q16 x86_64 20190101 https://imagemagick.org
    file_uploads: File uploads is turned off
    post_max_size: 100M
    upload_max_filesize: 100M
    max_effective_size: 100 Mo
    max_file_uploads: 20
    imagick_limits: 
    	imagick::RESOURCETYPE_AREA: 122 Mo
    	imagick::RESOURCETYPE_DISK: 1073741824
    	imagick::RESOURCETYPE_FILE: 768
    	imagick::RESOURCETYPE_MAP: 512 Mo
    	imagick::RESOURCETYPE_MEMORY: 256 Mo
    	imagick::RESOURCETYPE_THREAD: 1
    gd_version: 2.2.5
    ghostscript_version: unknown
    
    ### wp-server ###
    
    server_architecture: Linux 4.19.0-8-amd64 x86_64
    httpd_software: nginx/1.14.2
    php_version: 7.4.14 64bit
    php_sapi: fpm-fcgi
    max_input_variables: 1000
    time_limit: 30
    memory_limit: 256M
    max_input_time: 60
    upload_max_filesize: 100M
    php_post_max_size: 100M
    curl_version: 7.64.0 OpenSSL/1.1.1i
    suhosin: false
    imagick_availability: true
    pretty_permalinks: true
    
    ### wp-database ###
    
    extension: mysqli
    server_version: 10.3.27-MariaDB-0+deb10u1
    client_version: mysqlnd 7.4.14
    
    ### wp-constants ###
    
    WP_HOME: undefined
    WP_SITEURL: undefined
    WP_CONTENT_DIR: /home/clients/aocwp2019/prod/aoc_media/wp-content
    WP_PLUGIN_DIR: /home/clients/aocwp2019/prod/aoc_media/wp-content/plugins
    WP_MEMORY_LIMIT: 256M
    WP_MAX_MEMORY_LIMIT: 256M
    WP_DEBUG: false
    WP_DEBUG_DISPLAY: false
    WP_DEBUG_LOG: false
    SCRIPT_DEBUG: false
    WP_CACHE: false
    CONCATENATE_SCRIPTS: undefined
    COMPRESS_SCRIPTS: undefined
    COMPRESS_CSS: undefined
    WP_LOCAL_DEV: undefined
    DB_CHARSET: utf8
    DB_COLLATE: undefined
    
    ### wp-filesystem ###
    
    wordpress: writable
    wp-content: writable
    uploads: writable
    plugins: writable
    themes: writable
    mu-plugins: writable
    
    
    • This reply was modified 12 months ago by supertomate.
    Plugin Author Pierre Lannoy

    (@pierrelannoy)

    The problem is that we can’t use auto-termination because it would force our users to reconnect every 24 hours.

    You’re right for “idle” sessions supervision.
    A workaround could be to use cookie ttl + override oldest session… It will not removes idle sessions but it will reuse them as soon it is needed (while respecting count limitations).

    What I also understand is that the display of the admin.php?page=pose-manager&id= page cannot be displayed under these conditions. Is this correct?

    Yes, it is corect.

    Regarding the report, sorry but it is truncated… 🙁
    Could you send me to [my-first-name]@[my-last-name].fr ?

    Thread Starter supertomate

    (@supertomate)

    To sum up, currently the plugin only lists the first 4000 users and does not allow to manage the sessions of the others, but Pierre will propose in a future version a setting of the number of sessions displayed.

    The problem of the user recognised with a wrong number of sessions seems to come from a browser cookie and the only solution for the moment is to overwrite the previous sessions and not to block.

    Big Up to Pierre and his wonderful work on this plugin!

    Plugin Author Pierre Lannoy

    (@pierrelannoy)

    Thank @supertomate for summarizing the situation so perfectly… and for your kind words.

    To be perfectly clear, the 4000 “display” limit will be adjustable in Sessions 2.4. It will allow to display more sessions in the “manual” tool. It will have no impact on the sessions limitation per user: it already works for an unlimited number of users and sessions.

    Thanks for helping me to understand this use-case…

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Bug with entries stats’ is closed to new replies.