Hello,
I have a PHP page which loads OK 80% of the time. However
the rest of the time I get the following error:
Fatal error: Failed opening required 'DB.php'
This really bugs me, especially since the only reason
this is happeneing seems to be due to server load. I
would like to add code so that instead of displaying
the given error, the PHP code makes the HTTP response
thread simply sleep a little bit (say 4 seconds), and
then retry, and repeat until the file can be opened.
It seems strange to me that server load would prevent
the file from being opened. Anyhow, any ideas on how
I can improve the situation?
Thanks,
Neil
I have a PHP page which loads OK 80% of the time. However
the rest of the time I get the following error:
Fatal error: Failed opening required 'DB.php'
This really bugs me, especially since the only reason
this is happeneing seems to be due to server load. I
would like to add code so that instead of displaying
the given error, the PHP code makes the HTTP response
thread simply sleep a little bit (say 4 seconds), and
then retry, and repeat until the file can be opened.
It seems strange to me that server load would prevent
the file from being opened. Anyhow, any ideas on how
I can improve the situation?
Thanks,
Neil
Comment