Title: Maximum execution time exceeded
Last modified: August 22, 2016

---

# Maximum execution time exceeded

 *  Resolved [steppade](https://wordpress.org/support/users/steppade/)
 * (@steppade)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/maximum-execution-time-exceeded/)
 * I have a ai1ec widget in the sidebar and one in the footer.
 * If intercet when the content is rendered with add_filter(‘the_content’,’mod_post_content’)
   trying to display a new calendar:
 *     ```
       $out.='[restab title="Eventi"]'."\n";
       $event='<div style="margin-bottom: 50px;">[ai1ec cat_name="'.$eventi_tag_name.'" view="stream"]</div>'."\n";
       $out.=$event.'[/restab]'."\n";
       ```
   
 * i recive this error:
 * Fatal error: Maximum execution time of 2 seconds exceeded in /var/www/site.it/
   htdocs/wp-includes/taxonomy.php on line 1331
 * If i put the same calendar in the normal way(in the post description field), 
   all work well.
 * If i remove the other 2 calendar widgets, the first method works well, too. some
   help?
 * [https://wordpress.org/plugins/all-in-one-event-calendar/](https://wordpress.org/plugins/all-in-one-event-calendar/)

Viewing 11 replies - 1 through 11 (of 11 total)

 *  [Nicola Peluchetti](https://wordpress.org/support/users/nicolapeluchetti/)
 * (@nicolapeluchetti)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/maximum-execution-time-exceeded/#post-5508322)
 * Hi,
 * it seems that you have set your [max_execution_time ](http://php.net/manual/en/function.set-time-limit.php)
   a little to low and thus this is causing the error, as probably the script takes
   more than 2 seconds to execute, so you should probably try to vhasnge that limit
 *  Thread Starter [steppade](https://wordpress.org/support/users/steppade/)
 * (@steppade)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/maximum-execution-time-exceeded/#post-5508323)
 * I will try to encrise the max execution time.
 *  Thread Starter [steppade](https://wordpress.org/support/users/steppade/)
 * (@steppade)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/maximum-execution-time-exceeded/#post-5508333)
 * Setting the max execution time to 30 seconds i recive another error. I suspect
   an infinite loop:
 * Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate
   944164 bytes) in /var/www/site.it/htdocs/wp-includes/taxonomy.php on line 1331
 *  [Nicola Peluchetti](https://wordpress.org/support/users/nicolapeluchetti/)
 * (@nicolapeluchetti)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/maximum-execution-time-exceeded/#post-5508349)
 * Hi can you check for plugin/theme conflicts?what version are you using?We had
   this error with Visual Composer
 *  Thread Starter [steppade](https://wordpress.org/support/users/steppade/)
 * (@steppade)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/maximum-execution-time-exceeded/#post-5508374)
 * I’m using sahifa theme 4.3.2 and All in 1 event calendar 2.1.8 and extended views
   1.1.1 but i got this with 2.1.5 and 1.1.0 too. Why you have renamed this post
   like “resolved”? I think that this is not a VC conflict? I don’t use VC.
 *  [Nicola Peluchetti](https://wordpress.org/support/users/nicolapeluchetti/)
 * (@nicolapeluchetti)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/maximum-execution-time-exceeded/#post-5508375)
 * Sorry for the resolved status probably got confused with threads 😀
 * Can you check for plugin conflicts or theme conflicts?
 *  Thread Starter [steppade](https://wordpress.org/support/users/steppade/)
 * (@steppade)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/maximum-execution-time-exceeded/#post-5508382)
 * In the first post i have written about this problem.
 * The conflict is with a self-made plugin that inject the ai1ec code in the content
   on rendering with add_filter(‘the_content’,’mod_post_content’) but the error 
   happens only if there is a widget somewhere(sidebar or footer) otherwise the 
   ai1ec injected works well.
 * If i put the same ai1ec code injected directly in the description box of a post
   and i update it removing the injection, the rendering works everytime well.
 * So, the problem is the redering of a ai1ec injected when there in another calendar.
 *  [Nicola Peluchetti](https://wordpress.org/support/users/nicolapeluchetti/)
 * (@nicolapeluchetti)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/maximum-execution-time-exceeded/#post-5508401)
 * If you add a filter like add_filter(‘the_content’,’mod_post_content’) it will
   run for every single post.
    That’s why it’s probably using lot’s of memory or
   taking long to execute, you should probably work on that filter to make it more
   speedy
 *  Thread Starter [steppade](https://wordpress.org/support/users/steppade/)
 * (@steppade)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/maximum-execution-time-exceeded/#post-5508417)
 * It run in the single post page with some category:
 *     ```
       if ($isTag===false && $isCat===false &&
         $isAttivita===false && $isEvent === false && $isHome==0 ){
         if(!inArrayAtLeastOne($postCats,getExcludeCats())){
            $is=true;
         }
       }
       ```
   
 * If i put the calendar in the normal way(in the post description field), all work
   well. The content hijack too(without calendar).
 * If i remove the other 2 calendar widgets, the hijack content work too (with calendar).
 * I have tryed 30 sec of execution time and it goes in memory exhausted.
 * So there is another problem.
 *  [Nicola Peluchetti](https://wordpress.org/support/users/nicolapeluchetti/)
 * (@nicolapeluchetti)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/maximum-execution-time-exceeded/#post-5508421)
 * I really can’t understand the scenario where things go out of memory. Anyway 
   debugging out of memory error is difficult because…there is no memory left for
   the debugger to run 😀
 * You should do as suggested [here ](https://stackoverflow.com/questions/13252681/tracing-a-php-out-of-memory-error/13272784#13272784)
   and use xDebug to understand where the memory error happens. It will probably
   be just one function which is called too many times
 *  [Nicola Peluchetti](https://wordpress.org/support/users/nicolapeluchetti/)
 * (@nicolapeluchetti)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/maximum-execution-time-exceeded/#post-5508460)
 * I’m marking this as solved. Reopen in case

Viewing 11 replies - 1 through 11 (of 11 total)

The topic ‘Maximum execution time exceeded’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/all-in-one-event-calendar.svg)
 * [Timely All-in-One Events Calendar](https://wordpress.org/plugins/all-in-one-event-calendar/)
 * [Support Threads](https://wordpress.org/support/plugin/all-in-one-event-calendar/)
 * [Active Topics](https://wordpress.org/support/plugin/all-in-one-event-calendar/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/all-in-one-event-calendar/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/all-in-one-event-calendar/reviews/)

 * 11 replies
 * 2 participants
 * Last reply from: [Nicola Peluchetti](https://wordpress.org/support/users/nicolapeluchetti/)
 * Last activity: [11 years, 6 months ago](https://wordpress.org/support/topic/maximum-execution-time-exceeded/#post-5508460)
 * Status: resolved