Maximum execution time of seconds exceeded_php tutorial

Source: Internet
Author: User
Tags php website server memory
Maximum execution time of seconds exceeded error resolution.

Simply summarize the solution:

Error One: Memory overrun, the specific error statement forgot, simply say the solution.

using cyclic batch import;
At the beginning of each loop, sleep (5) is used, the statement is deferred to prevent the server memory from taking up too much at the same time, and the numbers are modified;
The internal end of each loop is used Ob_flush (); Refresh Output Buffer
Flush (); Sends all output of the program so far to the user's browser
Both must be used simultaneously to flush the output buffer www.2cto.com

Error two: 30 seconds running timeout errors (Maximum execution time of seconds exceeded)

Workaround:

Method One, modify the php.ini file

Max_execution_time = 30; Maximum execution time of each script, in seconds
Set it to the value you want. If it is set to 0, it will never expire.
Method Two, modify the PHP execution file
Plus
Set_time_limit (0);
?>

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

From the construction of CIS network PHP website

http://www.bkjia.com/PHPjc/478350.html www.bkjia.com true http://www.bkjia.com/PHPjc/478350.html techarticle Maximum execution time of seconds exceeded error resolution. A brief summary of the solution: Error One: Memory overrun, the specific error statement forgot, simply say the solution. ...

  • 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.