View previous topic :: View next topic |
Author |
Message |
rodentratman -
Joined: 22 Jul 2007 Posts: 6
|
Posted: Sun Jul 22, 2007 8:14 am Post subject: Internal Server 500 timeout error with broken pipe |
|
|
cgi.log shows the following as the cause of the error
CGI: [C:\PHP\php-cgi.exe ]
URI: /dir/file.php
Broken pipe
Background:
The script performs row reduction on a matrix
(i.e. mathematical operations on an array in PHP ($array[$row][$column])
Everything works fine for a limited number of records (20 seconds worth)but as soon as it gets over about 30 seconds of script execute I receive "Error 500: Internal Server Error".
The timeout in Abyss Configuration is set to 120 seconds.
I've used set_time_limit() in PHP to try to extend the time the script can run with values of 60 and 120 but the error still displays after about 30 seconds.
I've also tried restarting the web server and echoing output as another help resource suggested this may help but with no success.
I'm using XP Home Edition on a Pentium 3 1GHz test PC (and yes I will be upgrading soon but in the meantime hopefully there is a solution to my problem under the given conditions).
Any help is appreciated!
Regards,
Roden |
|
Back to top |
|
|
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Sun Jul 22, 2007 2:02 pm Post subject: Re: Internal Server 500 timeout error with broken pipe |
|
|
rodentratman wrote: | I've used set_time_limit() in PHP to try to extend the time the script can run with values of 60 and 120 but the error still displays after about 30 seconds. |
PHP has also its own timeout parameter that has to be increased too: edit php.ini, and change the value of the max_execution_time. _________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
|
rodentratman -
Joined: 22 Jul 2007 Posts: 6
|
Posted: Sun Jul 22, 2007 3:03 pm Post subject: Re: Internal Server 500 timeout error with broken pipe |
|
|
--- double posted oops ---
Last edited by rodentratman on Mon Jul 23, 2007 12:42 am; edited 1 time in total |
|
Back to top |
|
|
rodentratman -
Joined: 22 Jul 2007 Posts: 6
|
Posted: Mon Jul 23, 2007 12:42 am Post subject: Re: Internal Server 500 timeout error with broken pipe |
|
|
aprelium wrote: | rodentratman wrote: | I've used set_time_limit() in PHP to try to extend the time the script can run with values of 60 and 120 but the error still displays after about 30 seconds. |
PHP has also its own timeout parameter that has to be increased too: edit php.ini, and change the value of the max_execution_time. |
Sorry should've made that clearer. I'd already edited php.ini to the value of 60. I then used set timeout with a matching value of 60 to reset the timer within the script and give it more time and upped it to 120 to see if it made any difference. I also tried changing the php directive to 120 seconds with the same internal server 500 timeout error occurring after roughly 30 seconds.
I'd restarted the Abyss web server but not the actual computer so did that last night. Also noticed that startup errors weren't on which was suggested in a similar post so going to give that a go as well to see if I can get any more information.
I've cleared temporary files and updated my version of Abyss and PHP to the latest versions which mostly seems to have removed the Internal Server 500 Error about 90% of the time which helped me find a bug that was reading column values that didn't exist in rows (was using a count of the number of rows instead of a count of the number of columns).
Even still, the script seems to just stop at around 30 seconds despite having a php.ini directive of 120 seconds, abyss timeout set at 120 and using set_time_out() with varying values.
I'm not getting the pipe error when it just stops without giving me the Internal Server 500 Error (as would be expected) but I'd like to stop the 30 second timeout altogether if I can.
If there's anything else I haven't mentioned that might help, let me know. Sometimes it helps just to have someone else's input even if it's not the solution.
Regards,
Roden |
|
Back to top |
|
|
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Mon Jul 23, 2007 2:16 pm Post subject: Re: Internal Server 500 timeout error with broken pipe |
|
|
rodentratman,
Are you using PHP with the FastCGI interface? Are you sure you're editing the right php.ini file (create a file with phpinfo() and check the output you get)? _________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
|
rrinc -
Joined: 24 Feb 2006 Posts: 725 Location: Arkansas, USA
|
Posted: Mon Jul 23, 2007 3:48 pm Post subject: |
|
|
Make sure you're using php-cgi.exe if you're using FastCGI. _________________ -Blake | New Server :D
SaveTheInternet
Soy hispanohablante. Puedes contactarme por mensajes privados. |
|
Back to top |
|
|
rodentratman -
Joined: 22 Jul 2007 Posts: 6
|
Posted: Tue Jul 24, 2007 3:04 am Post subject: |
|
|
rrinc wrote: | Make sure you're using php-cgi.exe if you're using FastCGI. |
phpinfo() does show fastcgi, but in any case I think the problem may now be resolved. The new release of PHP and Abyss seemed to reduce the occurrence of the error dramatically despite still timing out.
The new installation of PHP created a new php.ini file in the php installation directory and was using this despite having a directory path pointing to the windows directory where the original was stored so there may have been a conflict which is why I was still receiving 30 second timeouts.
I've started work on a second project so can't test it to be sure but this has definitely given me some insight. Thankyou for your help.
Regards,
Roden |
|
Back to top |
|
|
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Wed Jul 25, 2007 2:14 pm Post subject: |
|
|
rodentratman,
If you are using our preconfigured PHP 5 package, the php.ini inside the PHP 5 installation directory is the configuration file that is taken into account. _________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
|
lestat -
Joined: 15 Sep 2003 Posts: 130 Location: GREEN BAY
|
Posted: Wed Aug 29, 2007 6:17 pm Post subject: |
|
|
Another thing to possibly consider is the script or job you are running. It's pretty unusual for a script or database query to consume this much time. Are you sure it's working correctly? Often times I've accidentally created multiple unnecessary loops in my scripts.
I have however, encountered time issues it during file uploading.
Cheers. _________________ XP Pro sp2
Abyss Web Server X2 (v 2.9.3.5)
PHP 5.3.8 |
|
Back to top |
|
|
|