My PHP app is timing out and throwing 5xx errors

Validated on 27 Aug 2024 • Last edited on 17 Apr 2025

Running out of time to execute a request is the most common cause of timeouts and 5xx errors in PHP apps on App Platform. By default, 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 the max_execution_time value to a higher number. user.ini files allow you to configure and override PHP settings on a per directory basis.

To increase your app’s maximum execution time, add a .user.ini file to the root of your app with the following contents:

.user.ini
max_execution_time=your_preferred_execution_time

You can set the execution time to a maximum of 100 seconds.

Why am I receiving 520 status codes from my app?

Your app may have crashed while trying to receive an upload or return a response larger than it has been configured to manage.

Why am I receiving a forbidden error when making changes to my App Platform app?

Your team balance may be past due. Pay your balance to lift restrictions on actions you can take on the platform.

Why does my app not restart when it fails a health check?

If an app’s health check fails, the app currently does not restart. This is because App Platform does not currently support liveness probes. An app only automatically restarts if the app crashes or if its disk or RAM usage exceeds the its limits.

We can't find any results for your search.

Try using different keywords or simplifying your search terms.