Using the DO Sample Laravel PHP app on the App Platform, after deploying, can’t increase the execution time, unsure what’s causing the issue. Error from logs indicates
WARNING: [pool www] child 189 ... execution timed out, terminating
Tried introducing env vars, .user.ini, nothing helps.
Can you please clarify the following:
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Heya, @petarsubotic
App Platform allows your app
30
seconds to execute a request before timing out. You can increase this time by editing your app’s.user.ini
file and setting themax_execution_time
value to a higher number.user.ini
files allow you to configure and override PHP settings on a per directory basis.You can also follow our docs here:
https://docs.digitalocean.com/support/my-php-app-is-timing-out-and-throwing-5xx-errors/
Hope that this helps!
Hi there,
The easiest way to edit the php.ini settings is to add a
.user.ini
file to your codebase with the following lines in it:You can check out the guide here:
The App Platform has a hard timeout limit of 100 seconds for any HTTP request. Having an HTTP request running for more than 100 seconds is usually not recommended as this means that your users will wait for that to complete and do not have to refresh their browsers, long-running processes are generally not ideal for HTTP requests and are better handled using background jobs or asynchronous processing.
If you absolutely need to handle HTTP requests longer than 100 seconds, you can consider switching from App Platform to a Droplet. Droplets give you full control over server settings, including timeouts as you will have root access and you can make any changes that you need to.
- Bobby