Jump to content

server timeout


jwstockwell

Recommended Posts

Running a script trying to insert 40,000 + zipcodes into a table:

I don't think I see it in the apache error log but I'll ask anyway.

Is this from mysql or apache?

Fatal error: Maximum execution time of 30 seconds exceeded in C:\Program Files\Apache Group\Apache2\htdocs\add_zipcodes.php on line 580

and what do I need to change to fix it?

TIA
Jim
Link to comment
Share on other sites

This is from PHP. By defualt PHPs max execution time of a script is 30secs which more than enough for a script. However in your case it appears your SQL query is taking a lot of processing time, prehaps due to too many overheads or sommit. To solve this, find and edit your php.ini file. Find the following line within the php.ini:
[code]max_execution_time = 30 ; Maximum execution time of each script, in seconds[/code]
Change 30 to 60.
Save the php.ini. Now you'll need to restart Apache in order for the updated php setting to take affect. If that fails to work go for 120. I wouldn't advise you to go over 120 secounds. As a script shouldn't need to take 2mins or more to execute.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.