I have a php sript with a simple mysql SELECT
query which fetches more than 1000 rows from the database…
It gives a 500 internal server error many times when I have a large number of rows to fetch..
The same script works fine when I run it from unix shell command:
/usr/bin/php scriptname.php
It's a server with apache + php fcgi.
Please help — thanks!
Best Answer
I think you're probably hitting the Fcgi timeout. How long does the script take to run? What does Apache's
error_log
say? Have you tried changing the FcgidBusyTimeout Directive in the Apache config?