Page 1 of 1

Very slow session_destory()

Posted: Fri May 16, 2008 5:11 am
by dinger
Hello all,

I'm having real trouble figuring out why a call to session_destory() is taking 50 seconds.

It's a file called cron.php in Moodle.

This only happens with our live server... Our test servers do not have this problem.

Please help!

Rob

Re: Very slow session_destory()

Posted: Fri May 16, 2008 11:27 am
by Jade
Maybe you should check your session settings in the php.ini file? Could be a difference there is causing the problem.

Re: Very slow session_destory()

Posted: Mon May 19, 2008 4:51 am
by dinger
The php ini files are unmodified.

This call actually causes apache to hang for the duration of the call... which obviously has an impact on our site.

Rob

Re: Very slow session_destory()

Posted: Mon May 19, 2008 9:44 am
by Glycerine
the first user contribution on here may help? It loops through the user sessions and clears them... would that help

http://uk.php.net/manual/en/function.session-unset.php

Re: Very slow session_destory()

Posted: Mon May 19, 2008 2:42 pm
by Jade
The only other thing I can think of is that you have an unusually large amount of data in each session. I would suggest loading a session and printing out everything that's in one. If it has any unnecessary data then make sure you remove it.

Re: Very slow session_destory()

Posted: Mon May 19, 2008 2:47 pm
by Glycerine
Why dont you store data in a mysql table create a random session key generated by user details such as IP and host etc... then save ALL there details to the database - EASY and fast...