500 read timeout

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
webstyler
Forum Commoner
Posts: 85
Joined: Sat Feb 14, 2004 2:16 am

500 read timeout

Post by webstyler »

Hello

I have a script, lunched by cron, that crashed.
I get email from cron with "500 read timeout"

At first row of script I have:

set_time_limit ( TIMEOUT_SEC );
ini_set('max_execution_time',TIMEOUT_SEC);

Where TIMEOUT_SEC is 3600

??

Thanks
User avatar
Ambush Commander
DevNet Master
Posts: 3698
Joined: Mon Oct 25, 2004 9:29 pm
Location: New Jersey, US

Post by Ambush Commander »

It looks like your timeout error has nothing to do with script execution time. If this is coming from Movable Type, try the instructions here: http://weblog.philringnalda.com/2003/02 ... ad-timeout
webstyler
Forum Commoner
Posts: 85
Joined: Sat Feb 14, 2004 2:16 am

Post by webstyler »

Ambush Commander wrote:It looks like your timeout error has nothing to do with script execution time. If this is coming from Movable Type, try the instructions here: http://weblog.philringnalda.com/2003/02 ... ad-timeout
Hello

I don't use Movable Type

Script is custom

Thanks
User avatar
maliskoleather
Forum Contributor
Posts: 155
Joined: Tue May 15, 2007 2:19 am
Contact:

Post by maliskoleather »

a few more details would make this easier to deal with.

could we get a better sample of the code?
what is this cron doing? ...its possible you're doing something that could take longer to execute than what you have allowed (ie. backing up a database, or scannning large amounts of files)...

and is it consistantly crashing? or was this a one time occourance? ...if so.. your sever might have just stalled for some reason.
webstyler
Forum Commoner
Posts: 85
Joined: Sat Feb 14, 2004 2:16 am

Post by webstyler »

maliskoleather wrote:a few more details would make this easier to deal with.
sure :)
maliskoleather wrote: could we get a better sample of the code?
sorry, I cannot

script is only 8Kb for 200 row
use of cpu/memory server is not high, but make more query on mysql database for import a lot of data
maliskoleather wrote: what is this cron doing? ...
script import sql file into dbase and after make a queue for mailing list

cron check any hour if there are file to import or queue to prepare and make this operations
maliskoleather wrote:
its possible you're doing something that could take longer to execute than what you have allowed (ie. backing up a database, or scannning large amounts of files)...
think this could be the problem
think script can need from 10 to 30 minutes (max)
maliskoleather wrote:
and is it consistantly crashing? or was this a one time occourance? ...if so.. your sever might have just stalled for some reason.
page crash and get 500 read timeout..
Post Reply