Cloud hosting - the Limit for the max_execution_time is 300 seconds, which is 5 minutes

"max_execution_time" refers to a configuration setting that determines the maximum amount of time a script is allowed to run on the server. It specifies the time limit in seconds for the execution of a PHP script or other server-side processes. By default, this setting is often set to 30 seconds.

--

To ensure the security and stability of our shared Cloud, we have set a maximum execution time limit of 300 seconds, equivalent to 5 minutes, for scripts running on our platform. We believe that 5 minutes is generally sufficient for most tasks.

Please note that the 5-minute limit is enforced by our diligent load balancers as a measure of protection against potential attacks. If you encounter a task that requires more time than the specified limit, we recommend utilizing alternative methods such as cron, SSH, or breaking the process into smaller segments. These approaches will help you achieve your goals without hitting the time restriction.

We appreciate your understanding and cooperation in maintaining the optimal performance and security of our Cloud hosting environment. Should you have any further questions or need assistance, our dedicated support team is always ready to assist you.

---

Here's how it works:

  1. Setting the value: The value of "max_execution_time" is typically set in the server configuration files, such as php.ini, which is used by PHP, or in the web server configuration files. It can also be modified programmatically within the script itself using the ini_set() function.
  2. Script execution: When a script or process is executed, the server/servers keeps track of the elapsed time. If the execution time exceeds the value specified in "max_execution_time," the server interrupts the execution of the script.
  3. Handling the time limit: When the time limit is reached, the server triggers a time limit exceeded error, such as a PHP "Maximum execution time exceeded" fatal error. This error message indicates that the script or process took longer than the allowed time to complete.
  4. Mitigating longer processes: In the case where a task requires more time than the set "max_execution_time," alternative methods are recommended. These can include:
    • Using cron jobs: Scheduling the task to run periodically using the server's cron job functionality. This allows the task to be executed at specific intervals without relying on user requests.
    • Utilizing SSH: Running long-running processes through a secure shell (SSH) connection, where the time limit is not applicable or can be adjusted separately.
    • Breaking into smaller processes: Dividing the task into smaller subtasks or processes that can be executed within the time limit. This approach ensures that individual components complete within the specified time frame.
    • By enforcing a maximum execution time, servers can prevent scripts or processes from consuming excessive server resources or getting stuck indefinitely, thus contributing to system stability and security.

---

Thank you for choosing our Cloud hosting service, which we offer in partnership with 20i, UK!

  • stackcp, max_execution, limit
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How to access all support articles about Cloud Hosting

Did you know that we have a dedicated support articles database for all our Cloud Hosting...

What are my email sending limits?

Email Account Limits The following limits apply to all messages sent via authenticated SMTP....

What’s the maximum MySQL database size allowed?

At stackcp.com  each MySQL database you create can store up to 1024 MB (1 GB) of data. As...

How do I use the free Website Malware Scanner?

Overview One of the major problems with malware is its persistence. This is why stackcp.com...

Can I have additional IP address for my Cloud Hosting?

Short answer: No. That's not possible as all Cloud Hosting packages use our CDN network, they...