|

cscart_stored_sessions
Posted 01 October 2010 - 02:42 PM #1
cscart_stored_sessions
what is the exact function of that table and how can I access it to see the entries/delete the entries (since the size keeps increasing all the time)
Thanks
Sap
PS I am running 2.0.14
Posted 24 November 2010 - 06:56 AM #2
I can't claim to fully understand the database schema, but I keep seeing the following session-related table increasing in size regularly, without any decrease ever:
cscart_stored_sessions
what is the exact function of that table and how can I access it to see the entries/delete the entries (since the size keeps increasing all the time)
Thanks
Sap
PS I am running 2.0.14
I have cleared logs and statistics but "cscart_stored_sessions" is still huge? When making backup it takes ages to backup this table. How to clear it and whats in it?
Posted 24 November 2010 - 11:12 AM #3

4.11.5
Posted 24 November 2010 - 12:39 PM #4
I recently had that problem and went directly to the database and cleared all data in that table with no problem, but keep in mind, clear is one thing, delete it is another
Ok what i figured that this table holds user carts, it would not be good idea to clear it all.
According to config.php
// Sessions storage live time
define('SESSIONS_STORAGE_ALIVE_TIME', 60 * 60 * 24 * 7 * 2); // 2 weeks
Carts should be stored for maximum 2 weeks.
But I have checked user carts and found this
This week 26, this month 236, this year 507, all 590 carts & wishlists
-------
This table contains bots and spiders
Posted 24 November 2010 - 12:56 PM #5
I have another cart with much fewer features than cs-cart. The same problem existed with this cart and at one point the cart did not work after the sessions table got too large. I had my host clear the tables.
Now the cart has a built in monthly maintenance routine. I log in, it says its time for maintenance, I click a button and caches and session tables are cleared automatically. Takes two seconds.
I think there are several processes in cs-cart that have to be performed periodically on a manual basis, some requires ftp access to perform. These maintenance processes should be automated for the normal user.
Bob
Posted 25 November 2010 - 06:14 AM #6
It appears that this is a universal problem with session data not clearing. Why does this process have to be manual?
I have another cart with much fewer features than cs-cart. The same problem existed with this cart and at one point the cart did not work after the sessions table got too large. I had my host clear the tables.
Now the cart has a built in monthly maintenance routine. I log in, it says its time for maintenance, I click a button and caches and session tables are cleared automatically. Takes two seconds.
I think there are several processes in cs-cart that have to be performed periodically on a manual basis, some requires ftp access to perform. These maintenance processes should be automated for the normal user.
Bob
My "cscart_stored_sessions" table contained all bots, googlebots, crawlers, spiders log ever visited my site, that was approx 160MB log data.
After removing everything site works much faster, DB size decreased 80-90%.
Posted 28 November 2010 - 06:30 PM #7
After removing everything site works much faster, DB size decreased 80-90%.
Just to be clear. Do you mean select Empty in phpMyAdmin?
Thanks
John
Posted 28 November 2010 - 06:42 PM #8
Just to be clear. Do you mean select Empty in phpMyAdmin?
Thanks
John
TRUNCATE cscart_stored_sessionsEnter this in the 'sql' tab
Posted 28 November 2010 - 08:02 PM #9
4.11.5
Posted 28 November 2010 - 09:57 PM #10
TRUNCATE cscart_stored_sessionsEnter this in the 'sql' tab
I just usually select that table from the list and hit the "clear" table option
Same thing - My version is a little meatier but they both accomplish the same task
Posted 29 November 2010 - 06:24 AM #11
Just to be clear. Do you mean select Empty in phpMyAdmin?
Thanks
John
I do not have phpMyAdmin
So what I did was backed up single database table "cscart_stored_sessions" from
admin.php?dispatch=database.manage
edited it with notepad that handles larger file sizes like this http://www.editpadlite.com/
Removed all lines below
............DEFAULT CHARSET=utf8;
Uploaded & restored
admin.php?dispatch=database.manage
Posted 29 November 2010 - 11:57 AM #13
Posted 29 November 2010 - 12:03 PM #14
Posted 29 November 2010 - 01:10 PM #15
Yes, the same thing happend to me, but even worse because in my admin end some smart errors occured, then I went again to the database and repaired the table and now it increases day to day of course, but nothing much, aldo it's a table you should empty from time to time depending on your shop popularity, it's kind of a pain, but it's got to be done.
But why information about bots & crawlers should be stored at all ?
Posted 29 November 2010 - 01:15 PM #16
Posted 04 December 2010 - 06:35 PM #17
Thanks again
John
Posted 04 December 2010 - 11:42 PM #18
1. Copy the below code and paste it in a notepad document, name the file "truncate-sessions.php" or anything you wish.
2. Edit the mysql login information.
3. Upload it to your server.
4. Add a Quick link in the back office and point it to whatever you named the file and wherever you put it (secure as needed).
That's it.. Hope this helps some of you.
<?php $host="localhost"; $username="your_db_username"; $password="your_password"; $database="database"; $table="cscart_stored_sessions"; $connection = mysql_connect("$host", "$username", "$password") or die ("Unable to Connect to Server"); mysql_select_db("$database") or die ("Unable to Select Database"); $sql = "TRUNCATE TABLE `$table`"; mysql_query($sql); echo "CS-Cart Sessions Table Cleared!"; mysql_close($connection); ?>
Posted 10 November 2013 - 02:52 PM #19
I was just experiencing same problem, but wonderingly on almost last version 3.0.1
Beside of _stored_sessions table I habe also full _sessions table and my question is if I can empty also this table or it has some importat informations, like customers live carts...
Also what is the best frequency of truncating these tables...
many thanks