WordPress.org

Ready to get started?Download WordPress

Forums

WooCommerce - excelling eCommerce
[resolved] A lot of wc sessions (?) (18 posts)

  1. hpwtexas
    Member
    Posted 1 year ago #

    So. If I go to /wp-admin/options.php, I can see 2,440+ fields that look like
    _wc_session_!3T2N$n4Y23w7v0XsECeaTUBiR))X4VF
    or
    _wc_session_expires_!3T2N$n4Y23w7v0XsECeaTUBiR))X4VF

    I have a plugin (Options Optimizer) that allows me to view/end/delete different plugin options so they do/don't autoload. The same number of _wc_session(...) fields are also visible on this plugin page. I've been working out several bugs with different plugins, updates and a cpu usage problem etc, so this could be old data of some kind. I've also been having to manually update my woocommerce , as the 'update wizard' always gets stuck with big plugins--could it be remnant of this?
    I was hoping someone could give me some insight on this _wc_session business, I cant find any info on it anywhere

    Thanks!

    http://wordpress.org/extend/plugins/woocommerce/

  2. hpwtexas
    Member
    Posted 1 year ago #

    4,000+ fields now. So I can say with *some* certainty, that these are login sessions -- but they dont seem to be expiring properly? Bottom line is, I'm able to delete these fields--but I have no idea if I should. I'd really like to tho, lol.

  3. mikejolley
    Member
    Plugin Author

    Posted 1 year ago #

    These are customer sessions - they should clear themselves after 48 hours. Don't delete them, they are tied to the customer's cookies.

  4. hpwtexas
    Member
    Posted 1 year ago #

    Thanks for getting back to me on this, Mike

    Should there be so many fields there, though? I'll start tracking a few of them to see if they expire--in the event that they don't expire, though, is there anything I could do to address this issue? I read that wc handles php sessions differently in 2.0, so I *think* these 4,000+ fields could be related to the update?

  5. mikejolley
    Member
    Plugin Author

    Posted 1 year ago #

    Each customer session creates 2. It's basically a custom version of transients. They are cleaned up by a cron job.

  6. hpwtexas
    Member
    Posted 1 year ago #

    Okay so there are now 29,840 of these fields! I haven't seen any expire--is there anything at all I should do/try/look at? woocommerce_cleanup_sessions doesn't look like its running right?

    SOS!!

  7. mikejolley
    Member
    Plugin Author

    Posted 1 year ago #

    Can you install a cron plugin and see if the cron job is running?

  8. hpwtexas
    Member
    Posted 1 year ago #

    When I posted last wc_cleanup was 'running' and was 'currently running', so I had rerun the job , but that made no difference--however just a moment ago, I noticed that wp_update_themes was scheduled for last month and was 'currently running' -- So I tried rerunning this job and this seemed to clean things up in my cron.. Here's the new schedule:

    wp_cache_preload_hook	[]	Next Run: 2013/04/08 19:48:23 (now)	Non-repeating
    
    woocommerce_cancel_unpaid_orders	[]	2013/04/08 20:10:35 (now)	Non-repeating
    
    wp_scheduled_auto_draft_delete	[]	2013/04/08 23:33:14 (2 hours 55 minutes)	86400 (1 day)
    
    wp_cache_gc	[]	2013/04/09 00:00:00 (3 hours 21 minutes)	86400 (1 day)
    
    woocommerce_scheduled_sales	[]	2013/04/09 05:00:00 (8 hours 21 minutes)	86400 (1 day)
    
    wp_version_check	[]	2013/04/09 06:46:44 (10 hours 8 minutes)	43200 (12 hours)
    
    wp_update_plugins	[]	2013/04/09 06:46:44 (10 hours 8 minutes)	43200 (12 hours)
    
    wp_update_themes	[]	2013/04/09 06:46:44 (10 hours 8 minutes)	43200 (12 hours)
    
    woocommerce_cleanup_sessions	[]	2013/04/09 07:03:41 (10 hours 25 minutes)	43200 (12 hours)
    
    yoast_tracking	[]	2013/04/09 15:29:07 (18 hours 50 minutes)	86400 (1 day)
    
    wp_scheduled_delete	[]	2013/04/09 18:46:52 (22 hours 8 minutes)	86400 (1 day)
    
    dbmanager_cron_repair	[]	2013/04/11 17:49:56 (2 days 21 hours)

    Also notice now that the number of wc_session & wc_sesion_exp. entries has dropped from almost 30,000 to 4,000. Each time I refresh the page, this number varies by about 500..

  9. hpwtexas
    Member
    Posted 1 year ago #

    Resolved!! Just finished running an update from 2.0.5 to 2.0.7, and there is now a new feature in Woocommerce > System Status > Tools, "Clear all sessions"(not listed on the dev log). Now instead of 2,000+ sessions, I only have what's actually being used! I can only assume that little button was your idea, Mike -- thanks for that, if you're reading. Now I can sleep at night.

  10. tiendacg
    Member
    Posted 1 year ago #

    Hi all!!

    I have the same problem, but the site it's not visible for the customers (version 2.0.13 of woocommerce), therefore, can't have increase. I have the plugin instaled in another site (version 2.0.5), and the options table behave normally.

    Thanks in advance.

    PS: Sorry for my bad english.

  11. jimlongo
    Member
    Posted 11 months ago #

    I just noticed I had over 80,000 rows of wc_session data.
    Crontrol tells me the cron job should run in another 8 hours, and that it's set to run every 12 but I can't believe that those 80,000 aren't a lot more than 12 hours of data.

    Is there any other reason why they wouldn't be getting deleted?

    Using Woocommerce 2.013 with WooCommerce Catalog Visibility Options 2.3.0

    Thanks.

  12. Chris
    Member
    Posted 11 months ago #

    i am having the same problem. The sessions only get cleared if I manually go into "System Status" and then "Tools" and clear all sessions. But I shouldn't have to do this all the time. I install a cron plugin and it says they are working properly.

    I am guessing this has something to do with a hosting problem but I am not even sure what to tell my hosting company. Any suggestions?

  13. jimlongo
    Member
    Posted 11 months ago #

    I think it is worth investigating the possibility that mod_sec (firewall) which is pretty standard on most cPanel servers is blocking cron. I'm surmising that cron fires, but then gets terminated by mod_Sec.

    Will report back if I find anything.

  14. delatdecatsini
    Member
    Posted 9 months ago #

    I use WC 2.0.20 and go into "System Status" and then "Tools" and clear all sessions but wp-option database remains all wc_session field(they're not cleared). Do anyone have similar problem?

  15. jaydc
    Member
    Posted 6 months ago #

    Same problem here. I was working on a very low traffic site overnight and 6000 records were created in a hour when I was likely the only person viewing the site. I watched the row count increasing every second or two.

    After 12 hours there are 24K records and the site is getting slower and slower.

    I can use Tools to clear sessions but I can't continue to log in to my client's site every couple of hours for the life of the site to manually clear them.

  16. stueynet
    Member
    Posted 6 months ago #


  17. lieutenantdan
    Member
    Posted 6 months ago #

    I am also getting this error, anyone trying to fix this or had luck with this?

  18. lieutenantdan
    Member
    Posted 6 months ago #

    Well I was able to find the source of the problem, it was a search engine bot scanning all the products "add to cart" button causing it to create a bunch of extra cart sessions. I was able to deter the bots by using this in my robots.txt

    User-agent: *
    Disallow: /*add-to-cart=*

    In case anyone is still having this problem or gets it in the future.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.