Editing post and page responding 503 Service Unavailable

I am trying to edit any page or post.

While editing, it takes some time and returns 503 Service Unavailable message on web.

Hardaware Configuration Processor : Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz Memory : 7953MiB width: 64 bits

Screenshot :

Topic server-load server Wordpress

Category Web


In order to find the problem, please follow these steps:

  1. Backup.
  2. Enable debug mode by adding the following code in your wp-config.php file.
define( 'WP_DEBUG', true );

// Enable Debug logging to the /wp-content/debug.log file
define( 'WP_DEBUG_LOG', true );
  1. Try to replicate the issue and check wp-content/debug.log file to see if there is any PHP error.
  2. Change your active theme to a default WordPress theme and see if the issue is happening again or not.
  3. Try to disable all plugins and activate them one by one and replicate issue to find which plugin is causing issue.

In your case, you may ask help from your service provider to find which file or code is causing that issue.

Note: These type of issues could happen because of mistakes in codes. E.G, if you are using save_post hook, make sure it is not going to be infinite.

How to avoid infinite loop in save_post callback


Your scripts might be stuck in infinite loop, not producing a fatal error but causing the server to timeout the request after some time. Try installing xdebug for your OS/distribution (php-xdebug in recent Ubuntu versions) which will enforce a xdebug.max_nesting_level directive that should log an actual error and a call stack to help you identify the problem.

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.