Author
|
Message
|
Ronnie Garcia
|
Tuesday 21 November 2006 12:38:52 pm
Hey,
One of our eZp site is getting his ezsession table really big. Actually, it's 720 Mb large, 519 093 entries. Its running 3.6.1 so it might be a bug, i want to upgrade to 3.6.11.
I would like to empty the table before i upgrade. Can i just drop everything in this table or it will break something ?
Thanks, Ronnie.
|
Marco Zinn
|
Tuesday 21 November 2006 1:32:53 pm
You can empty the table. This will invalidate all your sessions, that means all logged in user will get kicked out and need to re-login. So, it's best to take the whole site offline before that, but i guess, you will do this for the update anyway. Don't drop the table, just "delete from ezsession" and remove all entries with this.
Marco
http://www.hyperroad-design.com
|
Joe Kepley
|
Tuesday 21 November 2006 1:35:48 pm
There's a script called cleanup.php in common/scripts. You can use this to clean all sorts of things in the DB, including all sessions, or only expired sessions if you prefer. As with anything else, I'd run a backup first, just to be on the safe side.
|
Ronnie Garcia
|
Tuesday 21 November 2006 2:55:53 pm
Great ! Thanks for the tips.
|
Matthew Carroll
|
Tuesday 21 November 2006 8:44:12 pm
I just added a feature request that I think would help this issue - better control of anonymous sessions either by them timing out sooner or by disabling the storage of anonymous sessions entirely: http://issues.ez.no/IssueView.php?Id=9536 ...of course, even if this is implemented it will still be necessary to clean up expired sessions regularly like Joe explained, or with a cron job. Matthew
http://carroll.org.uk
|
Xavier Dutoit
|
Wednesday 22 November 2006 1:11:19 am
You have a script:
./update/common/scripts/updatesession.php
See the details, but that's able to clear only the old sessions and keep the current onces. Put that into a cron. X+
http://www.sydesy.com
|
micah anderson
|
Thursday 30 November 2006 11:06:28 pm
When I try to run the update/common/scripts/updatesession.php, I get the following error immediately back:
Fatal error: eZ publish did not finish its request The execution of eZ publish was abruptly ended, the debug output is present below.
|
Xavier Dutoit
|
Saturday 02 December 2006 1:26:09 am
Hi, looks like a php-cli problem. like the php-mysql extension isn't installed for the cli or wrong php version or something like that.
http://www.sydesy.com
|
kracker (the)
|
Saturday 09 December 2006 4:29:36 am
I believe the error you encounter is indeed a php-cli problem, possibly a reference problem. I have encountered this problem, solved it on several occasions and documented my efforts and results. The following reading should bring you up to speed as well as show you step by step how to solve this problem.
<i>http://ezpedia.org/wiki/en/ez/references http://ezpedia.org/wiki/en/ez/solution_building_php_cli_for_ez_publish_command_line_scripts</i>
Cheers, //kracker
Member since: 2001.07.13 || http://ezpedia.se7enx.com/
|
meinhard benn
|
Monday 12 March 2007 2:55:30 pm
Hi Xavier, regarding your reply from Wednesday 22 November 2006 10:11:19 am: I looked at ./update/common/scripts/updatesession.php and I can not find any DELETE statement, only UPDATE. Are you sure that the script is capable of clearing sessions from the ezsession table? I am using eZ publish 3.8.8. Cheers, Meinhard.
http://goozee.benn.org/ - Google Co-op for eZ sites
|
Xavier Dutoit
|
Monday 12 March 2007 3:05:45 pm
My bad,
./update/common/scripts/cleanup.php expired_session
is your friend. X+
http://www.sydesy.com
|
meinhard benn
|
Tuesday 13 March 2007 8:15:39 am
I don't think the script can clean all siteaccesses at once, so I did this (BASH):
for siteaccess in `ls ./settings/siteaccess`; do
/usr/bin/php4 ./update/common/scripts/cleanup.php -s $siteaccess expired_session
done
Replace /usr/bin/php4 with your PHP path and you should be sorted.
http://goozee.benn.org/ - Google Co-op for eZ sites
|
Norman Leutner
|
Monday 07 May 2007 5:12:59 am
There'a also a cronjob extension which cleans up the sessions: http://ez.no/community/contribs/cronjobs/session_cleanup
Mit freundlichen Grüßen
Best regards
Norman Leutner
____________________________________________________________
eZ Publish Platinum Partner - http://www.all2e.com
http://ez.no/partners/worldwide_partners/all2e_gmbh
|