• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Resolved Sudden error 503 on website

patolucatis

New Pleskian
Server operating system version
Ubuntu 22.04.2 LTS
Plesk version and microupdate number
Obsidian 18.0.53
Hello again. So, I've been working on my website some more, and after making some changes, I suddenly get an error 503 on my main website. Scared, I roll back by loading in one of the backups I have, but then the error remains, and I don't even know what is going on anymore. Any ideas?
 
For the record, I haven't touched anything else, just restored the backup to a few days ago before I started moving stuff.
 
It is possible that the website creates infinite or very long PHP script runs. Once the maximum allowed number of children are used up, no further request can be served. Solution: Check the number of PHP FPM processes the your domain utilizes on the system level (# ps aux | grep fpm | grep <your domain>), then either raise the number of allowed children in the domain's PHP settings or fix the scripts that they are neither persistent, neither long running.

It is also possible that for some reason a PHP-FPM instance crashed. If you suspect that, you can simply restart the PHP-FPM service of the version your website needs. I'd also restart the web server(s) afterwards. Example: # service plesk-php74-fpm restart && service apache2 restart

If you have configured automated (scheduled) backups, please make sure that the option to stop the web service during backup is not checked as that could be another issue.
 
Update: tried restarting the server, and now I can't even get in, neither the website nor the server. Anything I can do about this?
 
This is not a Plesk issue, but a server issue. The server either crashed or is caught in a reboot loop. Please contact your data center, they will be able to help. This is an issue that needs to be solved on the operating system level or hardware level.
 
Update again: managed to restore the server, but the 503 remains. What I don't get is, why was it working before, and now, with the backup of the version that worked, it gives me the 503 error. Does it make any sense?
 
The 503 can have several reasons. Here are some ideas what you could check:

  • The script itself is faulty or relies on input that lets the script fail. It cannot deliver an output. (Solution: Check the error_log for details.)
  • The PHP-FPM service of the PHP version that the website uses is not running. (Solution: Start that PHP-FPM, e.g. "service plesk-php<version>-fpm start".)
  • The PHP-FPM configuration file of that PHP version or the domain contains an unusual configuration that leads to the error.
  • You are using a subdomain in which at least one letter is capitalized. This can lead to inaccessible files for PHP-FPM, because some libraries and scripts convert the domain into lowercase, others don't. (Solution: Rename to a domain where all letters are lowercase.)
  • The web server configuration between Apache and Nginx is broken. Apache might not deliver script results properly to Nginx so that the connection "times out". (Solution: Try to disable Nginx, e.g. "/usr/local/psa/admin/sbin/nginxmng -d" to only remain using Apache, then examine the error_log as you will probably find more details why .php files are not interpreted correctly).
  • Nginx was disabled, but some reason the PHP-FPM setting was not changed to PHP-FPM via Apache.
  • A custom PHP version is used, but there is an error in that installation.
  • The number of children of PHP-FPM is exhausted, no more instances can be spawned.
 
Here's what I could check so far:
  • error_log does not show anything.
  • The domain has all lowercase.
  • Nginx is enabled.
  • The PHP version used is 8.2.11, hasn't been touched at all.
  • The number of children is 10, the default amount.
For the rest of the things, gonna ask that they give me SSH access to the server so I can try stuff out.
 
If you do not yet have SSH access you seem to not be the admin of the server. In that case, the admin should solve the issue for you.
 
Aaaaaand the issue was solved. In the end, it was... Maintenance mode. It had somehow turned on without me realizing. Thanks for all the help, anyways.
 
Back
Top