Support » Plugins » maximum execution time of 30 seconds exceeded

  • Resolved totzkie


    Hi Everyone,

    Im currrently developing a plugin and currently encounter a problem maximum execution time of 30 seconds exceeded…. during my program execution. I searched on how to fix it and found solutions which says that I need to put set_time_limit(0) in the config.php or in the .htaccess insert php_value max_execution_time 60, but I want it to be included in my plugin.
    Is there anybody knows how to programmatically insert those line of code I’ve mentioned above.

    Thanks in advance…

Viewing 7 replies - 1 through 7 (of 7 total)
  • Here’s the info on php docs,

    Are you developing the plugin for yourself or for distribution? 30 seconds is a lot of time so unless there’s some specific application/plugin with limited distribution, it is generally a bad idea to extend the time out even further.

    Do you really need more than 30 seconds?

    actually, the project I am doing is for our school sake. And the plugin need more than 30 seconds to process. So that, I need to include in my plugin to automatically set the time limit before starting process.

    Could you help me how to do this or just give me a hint? I really need to done this as soon as possible. Thanks…

    if your host allows, create a php5.ini file with the proper settings…commonly, on basic hosting this is not allowed. Review with your webhost.

    oh I see, I never thought that it is not allowed on basic hosting. So it depends on the webhost .
    Thanks for the reply.

    Did you read the doc and test by adding set_time_limit() to your plugin code?

    what do you mean by testing adding set_time_limit() to my plugin code? Is that mean I will just add set_time_limit() somewhere in my plugin code? But yes, I have read the documentation on how to fix the problem but it states that I should insert set_time_limit() in the config.php file of wordpress. Unfortunately, I don’t know how to implement that process with the use of my plugin.

    Hi Ming Sheu, I would like to say thank you very much. Finally, It works, I just insert set_time_limit() into my plugin process section, and no need to configure the config.php. I didn’t encounter the error anymore.
    Thank you very much again and more power.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘maximum execution time of 30 seconds exceeded’ is closed to new replies.