If a long-running page, import or report fails with a message like "Maximum execution time exceeded", you have hit the PHP execution time limit. Here is how it works on FimuroHost Cloud Hosting and what to do about it.
What is max_execution_time?
max_execution_time is a PHP setting that caps how many seconds a script may run. Many servers default to 30 seconds. Once the limit is reached, PHP stops the script with a fatal error.
You can raise it for your site in your PHP settings or with ini_set('max_execution_time', 300); in your code, but only up to the platform maximum.
The limit on Cloud Hosting
For web requests, the maximum is currently 300 seconds (5 minutes). It is enforced by the platform's load balancers as a protection against attacks, so setting a higher value in PHP will not extend it. Five minutes is plenty for normal page loads and most admin tasks. Limits can change; ask support if you need more.
How to handle longer tasks
- Run it over SSH. Commands you run in an SSH session are not subject to the web request limit. This is the best option for big imports, WP-CLI jobs and Composer.
- Use a scheduled task (cron job). Run the job in the background on a schedule rather than waiting for a browser request to finish.
- Split the work into batches. Process a few hundred records per request instead of everything at once. Many import and backup plugins have a batch-size setting for this.
- Import large databases from the command line instead of phpMyAdmin.
Tips
- If a normal page takes anywhere near this long, something is wrong. Look for a slow plugin, a heavy database query or an external API that is not responding.
- For WordPress, a slow site is often fixed by removing unused plugins and making sure caching is active.
Need help?
Our support team is happy to take a look. Open a ticket at app.fimurohost.com/submitticket.php or message us on WhatsApp at 01818160926.
Categories
Written by
FimuroHost Team
Technical Writer