Re: sessions and trans-sid problem/question
| From: | Jason Wong | Date: | Fri, 22 Nov 2002 08:45:03 +0000 |
| Subject: | Re: sessions and trans-sid problem/question | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-125577@lists.php.net to get a copy of this message | ||
On Friday 22 November 2002 16:28, Jean-Christian Imbeault wrote:
> Ernest E Vogelsinger wrote:
> > This is controlled by the session.gc_probability value in your INI file
>
> I know I can probably find this in the documentation somewhere but ...
> how do I set the expire time on a session?
>
> > Increasing this value will make this
> > process more often, setting it to 100 will have PHP run the garbage
> > collector every time a PHP script gets executed (you shouldn't do this -
> > think in concurrency terms...)
>
> Again, why would congruency be affected by the gc? If the session hasn't
> timed-out then the gc won't clean it up. If it has then it's ok to clean
> it up. I obviously am missing something has what you say seems to make
> sense but I can see it just yet :)
If you set it 100, then _every_ request in which sessions are used, PHP has to
go through all the session files (by default stored in /tmp) and check
whether they have expired. If you have a busy server you could have thousands
of session files. Checking thousands of files at each request is very time
consuming.
--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
/*
Traffic jam on the Information Superhighway.
*/