WordPress.org

Support

Support » Plugins and Hacks » [Resolved] A lot of wc sessions (?)

[Resolved] A lot of wc sessions (?)

  • 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/

Viewing 15 replies - 1 through 15 (of 17 total)
  • 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.

    Plugin Author Mike Jolley

    @mikejolley

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

    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?

    Plugin Author Mike Jolley

    @mikejolley

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

    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!!

    Plugin Author Mike Jolley

    @mikejolley

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

    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..

    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.

    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.

    jimlongo

    @jimlongo

    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.

    Chris

    @lamordnt

    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?

    jimlongo

    @jimlongo

    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.

    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?

    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.

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘[Resolved] A lot of wc sessions (?)’ is closed to new replies.