Page 1 of 1

Web server freezes until script times out.

Posted: Mon Jul 17, 2006 8:50 pm
by themurph
I have 2 scripts on my site that are causing me some grief. One script
generates (occasionaly large) PDF reports, and the other queries
a web service.

It seems like for both of these scripts, whenever they kick off, the web
server bascially "freezes" until the script finishes.

This usually isn't a problem, but on very rare occasions, the scripts will have errors
or something will happen that basically hangs the web server up until the
script either bombs or times out.

When this is happening, I can still access the server just fine via SSH, ftp,
etc... only the web server freezes.

My question is: Is there a php.ini, apache conf, or general linx setting that
I am missing that would alleviate this issue?

Hope this is enough info, and the right forum. Please forgive my noobishness.

Re: Web server "freezes" until script times out.

Posted: Tue Jul 18, 2006 11:04 pm
by joseluisloya
[quote="themurph"]
This usually isn't a problem, but on very rare occasions, the scripts will have errors
or something will happen that basically hangs the web server up until the
script either bombs or times out.

When this is happening, I can still access the server just fine via SSH, ftp,
etc... only the web server freezes.
[quote]

If you can still acces via SSH, etc, etc.. The web server donst crash.... is the Web Browser who crash...

Sometimes the scripts generates a "infinite bucle" of errors.... That errorrs shows in the web browser, because is a infinite bucle the web browser crash..

The solution to this is "DONT SHOW ERRORS"..

At the first of your script..

Code: Select all

error_reporting(0);
Sorry for my english..


Jose Luis LOya.

Posted: Mon Jul 24, 2006 5:57 pm
by themurph
Thanks for the suggestion! I tried setting the error level and it appears to have no effect on
the timeouts I am experiencing.

This has really gotten to be quite a pain in the arse for me, as I still cannot figure out what
is going on, and I cannot attempt to debug during working hours, nor in my development
enviroment (because of the web service vendor's security policies).

I have narrowed the problem down to one particular script that uses the PEAR SOAP package.
This one script seems to lock up the entire web server until it either completes or times out.
Usually the script only takes a second or 2 to query and retrieve the result set from a vendor's
web service, so it is pretty transparent. But try and retrieve a LARGE resultset, and you have a
serious problem (everyone using the system gets a nonresponsive website until the script
runs its course).

If anyone else has any suggestions, I would appreciate it. I have tried numerous php.ini
settings to no avail.