NGINX Bad Gateway error: Tips

Errors may occur because of the following reasons:

  • there is an increase in request and the server does not have much resources
  • performance deteriorates because of continuous uptime that causes memory leaks and php fragmentation
  • Query execution is slow in MySQL data table
  • PHP errors have occurred in themes and plugins

 

First, try to restart your EC2 instance to try to eliminate some problems with it.

 

If this does not get solved with that, check whether you have enough / shortage of resources in CPU utilization or Network in CloudWatch.

If NetWork In is more than usual, increasing the CPU Utilization may cause insufficient server resources.

Stop the instance once, change the instance type to a larger one and start the instance again.

 

To check whether the data of MySQL table is not corrupt, use the mysqlcheck program.

By entering the following command, you can check whether there is damage to the MySQL DB table.

`` `

$ Mysqlcheck -c -u root -A

`` `

 

If it's broken, repair is possible if there is a table to mysqlcheck the table by specifying the -r option

If wordpress wp_options table in the database is corrupted, run the following command.

`` `

$ Mysqlcheck -r wordpress wp_options -u root

`` `

 

If you run the following command, you will be able to repair all he tables in the MySQL DB.

`` `

$ Mysqlcheck -r -u root -A

`` `

 

Check the log file if PHP error does not occur in plugins and themes in /var/log/php-fpm/www-error.log (for HHVM version, / var / log / hhvm / error).

This logfile has PHP runtime error.

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.
Powered by Zendesk