FastPanel: Site Errors 500, 502, 503, 504 and Database Errors
In the examples my-site.com is your domain. First look at the error code — it is shown on the page or in the browser tab.
| Error | What it means |
|---|---|
| 500 Internal Server Error, blank page | an error in the site's PHP code or in .htaccess |
| 502 Bad Gateway | nginx did not get a response from the PHP handler (Apache or PHP-FPM) |
| 503 Service Unavailable | the site's handler is temporarily unavailable or overloaded |
| 504 Gateway Time-out | a script is taking too long |
| "Error establishing a database connection" | the site cannot connect to its database |
The key tool: site logs
Site card → "Logs". For a 500 error, check the Backend error tab — it has PHP errors. For 502 and 504, check the Frontend error tab with nginx errors. Details: scheduler and logs.

500 and a blank page
- PHP Fatal error in the Backend error tab — an error in the code: the file and line are shown. After a WordPress plugin update, rename the plugin folder in
wp-content/plugins. - The site needs another PHP version — site card → "Settings" → backend: PHP version and settings.
- .htaccess rules do not work — in PHP-FPM mode the .htaccess file has no effect, and the rules are moved to the nginx settings. If the site needs .htaccess, choose FastCGI mode.
502 and 503
nginx cannot get a response from the site's handler. Most often the PHP-FPM or Apache service has stopped; less often the process is overloaded. Services are checked and restarted in "Settings" → "Services" as the server administrator (fastuser) — FastPanel services. If you do not have this login, contact support. If the service stops again, look for the cause in the Backend error tab.
504 Gateway Time-out
A script did not respond in the allowed time: a long import, a backup made by a plugin, a heavy report. Split the operation into parts or run it on a schedule — the scheduler. The PHP execution time (max_execution_time) is set in the site's PHP settings.
Database connection error
- Open the site's settings file:
wp-config.php(WordPress),configuration.php(Joomla),config.php(OpenCart) or.env(Laravel). - Compare the database name and user with the list in "Management" → "Databases". The server (host) is
localhost, port 3306. - If you are not sure about the password, set a new one for the database user: "Databases" → user → "Edit". Then enter this password in the settings file.
- If all sites on the server show the error at once, the MySQL service has most likely stopped. It is started in "Settings" → "Services" as the server administrator (fastuser) or through support.

More about databases: database in FastPanel.