Posted by Chung Leong on 09/07/06 14:18
Chung Leong wrote:
> Gucci wrote:
> > Some guy told me if i use database to store the session data and the
> > client has a low speed, the database will be kept connected until the
> > client agent download the webpage totally.
> > is that true?
>
> It depends on the size of the page and the send buffer size. If there's
> more data than the buffer can accommodate, then the script will stall
> until some of that is transferred. The default send buffer size for
> Apache is 64K I believe.
Wait a minute, that's wrong. TCP/IP guarantees delivery. A write to
socket won't return until the data is acknowledged by the client. PHP
does buffering too, but it's flushed prior to the session closing. And
a database connection would only be destroyed at the very end of the
request handling process. So if you don't close it explicitly, it won't
be released until the page is fully transferred.
[Back to original message]
|