• Resolved John

    (@dsl225)


    Hi guys,

    I’m using a monthly scheduled export of form submissions by email and today I got this error:

    Fatal error: Maximum execution time of 600 seconds exceeded in /wp-content/plugins/forminator/library/class-export.php on line 718

    Apparently, this relates to the cron and the server’s max_exec_time which is set to 600 secs.

    This is the first time, as those submissions reached about 100 entries with a dozen fields.

    I also just tested the manual export to csv file and everything worked fine, without getting any error. That could also possibly mean that there was a server error at the time when the cron was run.

    What would you recommend? Simply increase the server’s max_exec_time or else?

    Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hello @dsl225,

    I trust you’re doing well!

    Since manual export is working, it might have been a temporary issue. Would you please reschedule one more export to happen as sooner is possible and see if this issue will happen again?

    Please enable debug mode, add the following lines in the wp-config.php:

    define( 'WP_DEBUG', true );
    define( 'WP_DEBUG_LOG', true );
    define( 'WP_DEBUG_DISPLAY', false );
    

    Please make sure that you insert these lines above /* That’s all, stop editing! Happy blogging. */ in the wp-config.php file.

    This way, all the errors will be saved inside the wp-content directory on the debug.log file.

    Please let us know how it went.

    Kind regards,
    Nastia

    Thread Starter John

    (@dsl225)

    Thanks Nastia,

    I didn’t do that yet because there have been some cascading events since the first error above appeared:

    – all sites at this shared account have been experiencing server overload issues, timeouts and constantly hitting resource limits. CPU usage constantly topping at 100% and Physical Memory Usage also at maximum.
    – I checked the error log and I see that this error repeated itself 24 times that same day since it started, during about 4 hours, and then again once the next day and once more the day after (today). Total 26 times.

    That could mean that the cron was keeping, and maybe still trying, to run.
    But I don’t understand why I got 24 errors for the first day and only one for the 2 following days.

    So I just did 2 things first:
    – temporarily disabled the scheduled exports
    – increased the PHP max exec time to 1200 (doubled initial value).

    I can see already that the Physical Memory Usage returned to normal but CPU usage is still at 100% and all other sites are still loading painfully.

    What would you suggest to do at this point in order to stop any remains that could be still try running in the background? Just de-activate and re-activate the plugin or else?

    Thanks.

    UPDATE: I just notice that the CPU usage also returned to normal values a bit later.
    That could mean the the cron has really stopped.

    • This reply was modified 4 years, 11 months ago by John.
    Plugin Support Williams – WPMU DEV Support

    (@wpmudev-support8)

    Hello @dsl225

    I hope you’re well today!

    Yes, the cron might actually be stopping “gracefully” so not really stop “right away” but the processes triggered by it and scheduled events complete (or fail) first. It rarely happens but if it was really busy I would assume it might have been that way.

    I suppose that if you didn’t re-schedule those exports, the resource usage is still at a pretty much regular level, right?

    On the other hand, about 100 submissions with 12 fields each makes 1200 “elements” which shouldn’t be that much, especially if that runs in background. I’m wondering then if there’s anything that might be affecting that process.

    Have you tried such scheduled export with all other plugins disabled? I realize it might be difficult on a production site so if you have any staging/development site on the same server it would be worth giving a shot.

    Also, 1.12 version of the plugin should bring some changes in code that should help with such issues as well.

    Best regards,
    Adam

    Thread Starter John

    (@dsl225)

    Thanks Adam,

    Yes, I didn’t yet re-schedule the export and I think I’ll wait for next version first as, anyhow, this export in monthly only for the client. I still can send him the CSV file anytime.

    I’m not feeling to make those checks with all other plugins at this point, as all previous exports were working fine and nothing changed in the configuration of this website since then. The previous export, one month ago, had only 20 submissions less so I don’t think those 20 alone crashed the whole thing.

    Let’s wait and see a bit.
    Will let you know if that happens again.

    Many thanks for your feedback.

    Hello @dsl225,

    I trust you’re doing well!

    Please let us know how it will go after re-scheduling a new export.

    Regarding a test for a conflict, please create a staging site, which is a copy of yu production site on a different location. Feel free to try out the Duplicator plugin to copy your site to a different location.

    Let us know how it went!

    Cheers,
    Nastia

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Submissions scheduled export max execution time’ is closed to new replies.