Sunday, February 6, 2011

Why ‘500 Internal Server Error’ on my website?2

PHP Coding Timing Out

If your PHP script makes external network connections, the connections may time out. If too many connections are attempted and time out, this will cause a “500 Internal Server Error.” To prevent such time outs and errors, we suggest that your relevant PHP scripts be coded with some timeout rules. Typically however, catching a timeout error when connecting to a database or externally to remote resources (example: RSS feeds) are difficult as they in effect freeze the script from continuing to run.
Removing any external connections can increase both the performance of your website and decrease the chances of you receiving a “500 Internal Server Error.”   Source netfirms.com