|
Posted by ZeldorBlat on 06/11/07 16:31
On Jun 11, 12:21 pm, Sergei Shelukhin <realg...@gmail.com> wrote:
> Hi. I have a session started in php and two browser windows (IE)/tabs
> (FF) open.
> In one window, I execute a very slow report, immediately after that, I
> execute a fast simple page in another.
>
> I have set up a timer that records time into global variable at the
> start of the request,
> it outputs three time values in seconds - right before session_start,
> right after session_start, and at the very end of the request.
> here's what it shows
> Slow report that started a second earlier:
> DEBUG: Before session start: 0.0115
> DEBUG: Session start: 0.0133
> DEBUG: End request: 101.9878
>
> "Quick" page that started after it:
> DEBUG: Before session start: 0.0114
> DEBUG: Session start time: 98.467
> DEBUG: End request: 99.084
>
> The same is true for any request count, all of them load as fast as
> the slowest one.
> What's wrong w/session_start and how do I fix it?
It's because the first request locks the session file and doesn't
release the lock until the session is closed (at the end of the
request). So, the other pages wait for it to finish. See this note:
<http://www.php.net/manual/en/ref.session.php#64525>
[Back to original message]
|