php-general Digest 25 Oct 2013 14:01:46 -0000 Issue 8409

Topics (messages 322370 through 322375):

Persistent connections
        322370 by: Nibin V M
        322371 by: Stuart Dallas
        322372 by: Nibin V M
        322373 by: Stuart Dallas
        322374 by: Nibin V M

Re: framework or not
        322375 by: Robert Cummings

Administrivia:

To subscribe to the digest, e-mail:
        php-general-digest-subscr...@lists.php.net

To unsubscribe from the digest, e-mail:
        php-general-digest-unsubscr...@lists.php.net

To post to the list, e-mail:
        php-gene...@lists.php.net


----------------------------------------------------------------------
--- Begin Message ---
Hello,

I have been reading docs and many are telling that persistent connections
are kept open indefinitely. But I found in PHP docs that it will not close
after script execution like requesting  a page; so should it close after
the request is over?

So when exactly a persistent connection should close?

Please advice.

-- 
Regards....

Nibin.

--- End Message ---
--- Begin Message ---
On 25 Oct 2013, at 11:10, Nibin V M <nibi...@gmail.com> wrote:

> I have been reading docs and many are telling that persistent connections
> are kept open indefinitely. But I found in PHP docs that it will not close
> after script execution like requesting  a page; so should it close after
> the request is over?
> 
> So when exactly a persistent connection should close?
> 
> Please advice.

A persistent connection is closed when the PHP process ends, or it gets 
disconnected by the server-side or due to a network error. Attempting to 
explicitly close a persistent connection will do nothing without complaining.

-Stuart

-- 
Stuart Dallas
3ft9 Ltd
http://3ft9.com/

--- End Message ---
--- Begin Message ---
Thank you for the quick response Stuart...one more doubt..at
http://php.net/manual/en/features.persistent-connections.php they states

=========
This means that when the same client makes a second request to the server,
it may be served by a different child process than the first time. When
opening a persistent connection, every following page requesting SQL
services can reuse the same established connection to the SQL server
=========

Is the persistent connection pool is re-used between apache child
processes ?


On Fri, Oct 25, 2013 at 3:54 PM, Stuart Dallas <stu...@3ft9.com> wrote:

> On 25 Oct 2013, at 11:10, Nibin V M <nibi...@gmail.com> wrote:
>
> > I have been reading docs and many are telling that persistent connections
> > are kept open indefinitely. But I found in PHP docs that it will not
> close
> > after script execution like requesting  a page; so should it close after
> > the request is over?
> >
> > So when exactly a persistent connection should close?
> >
> > Please advice.
>
> A persistent connection is closed when the PHP process ends, or it gets
> disconnected by the server-side or due to a network error. Attempting to
> explicitly close a persistent connection will do nothing without
> complaining.
>
> -Stuart
>
> --
> Stuart Dallas
> 3ft9 Ltd
> http://3ft9.com/
>



-- 
Regards....

Nibin.

http://TechsWare.in

--- End Message ---
--- Begin Message ---
On 25 Oct 2013, at 12:51, Nibin V M <nibi...@gmail.com> wrote:

> Thank you for the quick response Stuart...one more doubt..at 
> http://php.net/manual/en/features.persistent-connections.php they states
> 
> =========
> This means that when the same client makes a second request to the server, it 
> may be served by a different child process than the first time. When opening 
> a persistent connection, every following page requesting SQL services can 
> reuse the same established connection to the SQL server
> =========
> 
> Is the persistent connection pool is re-used between apache child processes ? 

No, connections are not shared between PHP processes. Nothing is shared between 
PHP processes.

-Stuart

-- 
Stuart Dallas
3ft9 Ltd
http://3ft9.com/


> On Fri, Oct 25, 2013 at 3:54 PM, Stuart Dallas <stu...@3ft9.com> wrote:
> On 25 Oct 2013, at 11:10, Nibin V M <nibi...@gmail.com> wrote:
> 
> > I have been reading docs and many are telling that persistent connections
> > are kept open indefinitely. But I found in PHP docs that it will not close
> > after script execution like requesting  a page; so should it close after
> > the request is over?
> >
> > So when exactly a persistent connection should close?
> >
> > Please advice.
> 
> A persistent connection is closed when the PHP process ends, or it gets 
> disconnected by the server-side or due to a network error. Attempting to 
> explicitly close a persistent connection will do nothing without complaining.
> 
> -Stuart
> 
> --
> Stuart Dallas
> 3ft9 Ltd
> http://3ft9.com/
> 
> 
> 
> -- 
> Regards....
> 
> Nibin.
> 
> http://TechsWare.in


--- End Message ---
--- Begin Message ---
ok..thank you very much Stuart :)


On Fri, Oct 25, 2013 at 6:02 PM, Stuart Dallas <stu...@3ft9.com> wrote:

> On 25 Oct 2013, at 12:51, Nibin V M <nibi...@gmail.com> wrote:
>
> > Thank you for the quick response Stuart...one more doubt..at
> http://php.net/manual/en/features.persistent-connections.php they states
> >
> > =========
> > This means that when the same client makes a second request to the
> server, it may be served by a different child process than the first time.
> When opening a persistent connection, every following page requesting SQL
> services can reuse the same established connection to the SQL server
> > =========
> >
> > Is the persistent connection pool is re-used between apache child
> processes ?
>
> No, connections are not shared between PHP processes. Nothing is shared
> between PHP processes.
>
> -Stuart
>
> --
> Stuart Dallas
> 3ft9 Ltd
> http://3ft9.com/
>
>
> > On Fri, Oct 25, 2013 at 3:54 PM, Stuart Dallas <stu...@3ft9.com> wrote:
> > On 25 Oct 2013, at 11:10, Nibin V M <nibi...@gmail.com> wrote:
> >
> > > I have been reading docs and many are telling that persistent
> connections
> > > are kept open indefinitely. But I found in PHP docs that it will not
> close
> > > after script execution like requesting  a page; so should it close
> after
> > > the request is over?
> > >
> > > So when exactly a persistent connection should close?
> > >
> > > Please advice.
> >
> > A persistent connection is closed when the PHP process ends, or it gets
> disconnected by the server-side or due to a network error. Attempting to
> explicitly close a persistent connection will do nothing without
> complaining.
> >
> > -Stuart
> >
> > --
> > Stuart Dallas
> > 3ft9 Ltd
> > http://3ft9.com/
> >
> >
> >
> > --
> > Regards....
> >
> > Nibin.
> >
> > http://TechsWare.in
>
>


-- 
Regards....

Nibin.

http://TechsWare.in

--- End Message ---
--- Begin Message ---
On 13-10-24 09:41 PM, Larry Garfield wrote:
On 10/23/2013 08:51 AM, Jay Blanchard wrote:
[snip] ....a bitter rant....[/snip]

Dang Larry - bad night?

That wasn't a bitter rant.  You haven't seen me bitter. :-)  That was
"tough love" to the OP.  I don't see a reason to pussyfoot around the
original question, which is one that comes up about once a month.  The
answer is always the same: How much is your time worth?

Basic math...

    Life: finite
    Time: infinite

    finite / infinite = 0

*sniffle*

Oh wait... you meant in the smaller scheme of things >:)

Cheers,
Rob.
--
E-Mail Disclaimer: Information contained in this message and any
attached documents is considered confidential and legally protected.
This message is intended solely for the addressee(s). Disclosure,
copying, and distribution are prohibited unless authorized.

--- End Message ---

Reply via email to