Maximum execution time of 30 seconds exceeded

Source: Internet
Author: User
Tags php website

Maximum execution time of 30 seconds exceeded error solution.

A brief summary of the solution:

Error 1: The Memory exceeds the upper limit. If you forget the specific error statement, let's briefly describe the solution.

Batch import using a loop;
Sleep (5) is used at the beginning of each loop. The statement is executed in a delayed manner to prevent the server from occupying too much memory at the same time and modifying the number in it;
Use ob_flush () at the end of each loop; refresh the output buffer
Flush (); sends all output of the program so far to the user's browser
Both must be used to refresh the output buffer www.2cto.com.

Error 2: 30 seconds running timeout error (Maximum execution time of 30 seconds exceeded)

Solution:

Method 1: Modify the php. ini file

Max_execution_time = 30; Maximum execution time of each script, in seconds
Set it to the required value. If it is set to 0, it never expires.
Method 2: Modify the php Execution File
Add
<?
Set_time_limit (0 );
?>

Max_execution_time = 30; Maximum execution time of each script, in seconds
Set it to the required value. If it is set to 0, it never expires.
 

From the PHP website construction of shunzi Network

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.