Intermittent PHP network connection errors, restart fixes it. What"s the cause?
am 04.01.2010 20:41:47 von MRL
Hi - At the top of my php scripts, I have code to connect to our ldap server,
in order for the scripts to make ldap requests. I don't have any disconnect
call in my code. Lately I have noticed that the apache server will get into a
state where connection requests will occasionally fail. When I refresh the
page, the connection almost always succeeds on the 2nd attempt. If I restart
the apache server, the problem totally goes away for a long period of time.
So I assume that somewhere, something is causing connections to stay opened
when the script ends, rather than automatically closing them.
This error occurs with other types of network connections that the script
makes (besides ldap), so it's not an ldap issue.
How does Apache automatically close connections? Is there any way to debug
the problem, i.e. to see if connections are left opened in some way?
I'm running redhat 5, httpd-2.2.3-31.el5_4.2
Thanks. - Mark
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: Intermittent PHP network connection errors, restart
am 04.01.2010 23:26:17 von Devraj Mukherjee
Hi Mark,
On Tue, Jan 5, 2010 at 6:41 AM, Mark London wrote:
> Hi - At the top of my php scripts, I have code to connect to our ldap ser=
ver,
> in order for the scripts to make ldap requests. =A0I don't have any disco=
nnect
> call in my code. =A0Lately I have noticed that the apache server will get=
into a
> state where connection requests will occasionally fail. =A0When I refresh=
the
> page, the connection almost always succeeds on the 2nd attempt. =A0 If I =
restart
> the apache server, the problem totally goes away for a long period of tim=
e.
> So I assume that somewhere, something is causing connections to stay open=
ed
> when the script ends, rather than automatically closing them.
>
From what you describe your LDAP connections are made from PHP and
thus should have nothing to do with Apache. I would suggest that you
might find more answers if you post this question to the PHP list.
> This error occurs with other types of network connections that the script
> makes (besides ldap), so it's not an ldap issue.
>
> How does Apache automatically close connections? =A0Is there any way to d=
ebug
> the problem, i.e. to see if connections are left opened in some way?
>
As you mentioned above its your PHP script that makes the LDAP
connection not Apache. Apache is not responsible for managing socket
connections that PHP opens.
--=20
"The secret impresses no-one, the trick you use it for is everything"
- Alfred Borden (The Prestiege)
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org