Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Cscart session Rate Topic   - - - - -

 
  • shikhar
  • Senior Member
  • Members
  • Join Date: 09-Oct 11
  • 156 posts

Posted 30 September 2013 - 02:05 PM #1

Hi Cs-carters,

My table cscart_sessions has grown too huge and probably is hurting the performance.

I see the sessions as old as one year.

Is there a safe way to clear the sessions older than certain period and for unregistered users ?

regds,
Shikhar
Cs-cart tips at shikhar.me

 
  • shikhar
  • Senior Member
  • Members
  • Join Date: 09-Oct 11
  • 156 posts

Posted 06 October 2013 - 11:28 AM #2

For anyone facing the same issue. You can run the following sqls (use you own suitable timestamp value for expiry) :

delete from cscart_sessions where expiry <= 1378038432
delete from cscart_user_session_products where session_id not in (select session_id from cscart_sessions)

Executing second statement will delete items from wishlist and abandoned carts, don't do that. I pissed off a lot of customers :(

Edited by shikhar, 29 November 2013 - 10:40 AM.

Cs-cart tips at shikhar.me

 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 12156 posts

Posted 07 October 2013 - 03:53 AM #3

should be done automatically based on your SESSION_ALIVE_TIME (think that's the name) define.

EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.


 
  • NeoN
  • Member
  • Trial users
  • Join Date: 20-Sep 11
  • 44 posts

Posted 21 November 2013 - 07:27 PM #4

I`ve experienced such problem.
My site is under development (so no customers see it) and I noticed great database size (about 200 Mb) 170 Mb was sessions table. Unfortunatly I don`t remember row count. I truncated it.
But 2 days later I saw that this table has 30 Mb with 6 rows (!!!). After defragmentation it size reduced to 30 kb.

Is this some cs-cart bug or db problem?