Categories

Featured templates

Fatal error: Maximum execution time of 30 seconds exceeded…

Alex Ross October 22, 2012
Rating: 4.2/5. From 6 votes.
Please wait...

If you encounter this error that means, that work to do by Apache web server to handle your task was long-time and it was stopped by time limit provided by ini configuration in php. Such task as image resizing or huge files operations can last long. You can change setting of time limit in PHP by function set time limit, where you give max execution time in seconds as parameter.

You should be aware of this error message, because it should not take more than 30s to complete a script normally. Sometime, it may because of coding mistakes like (infinity loop in your code).

We strongly recommend you to contact your hosting provider and ask them to fix the issue for you.

There are two methods to solve this problem:

Method 1:

Step 1 : Open php.ini; Step 2 : Modify the value of “max_execution_time” to a greater value say 600; Step 3: Restart Server.

Method 2 (Recommended):

Add “set_time_limit(600)” in your code, where the input parameter is the max execution time, and 0 means unlimited.

But be aware. You can hung your server if your job is endless (like never ending loop), so don’t set this value too high.

This entry was posted in Hosting FAQ, Website & server errors and tagged exceeded, execution, maximum, time. Bookmark the permalink.

Submit a ticket

If you are still unable to find a sufficient tutorial regarding your issue please use the following link to submit a request to our technical support team. We'll provide you with our help and assistance within next 24 hours: Submit a ticket