504 Gateway timeout


#1

I have a site that has been running on easyengine for several months with no issues.

Today, the site became unresponsive. I have rebooted twice but am receiving a “504 Gateway error” when I try to access the site.

The swap IO has been high for the last couple hours. How should I troubleshoot this?


#2

Update: I was able to get the server to serve requests again by rebooting a couple more times.

What logs should I check to find the issue and prevent it in the future?


#3

@jbiggs77
Hi,
PHP taking more time to execute, to fix it refer this


#4

@jbiggs77
can you post output for ee info command.


#5

Nginx (nginx/1.4.1) Information:

Nginx User: www-data
Nginx worker_processes: 4
Nginx worker_connections: 2048
Nginx keepalive_timeout: 20
Nginx fastcgi_read_timeout: 300
Nginx client_max_body_size: 100m
Nginx Allowed IP Address: 127.0.0.1 173.88.8.177

PHP (5.5.9-1) Information:

PHP User: www-data
PHP expose_php: Off
PHP post_max_size: 100M
PHP upload_max_filesize: 100M
PHP max_execution_time: 300

PHP ping.path: /ping
PHP pm.status_path: /status
PHP pm.max_requests: 500
PHP pm.max_children: 100
PHP pm.start_servers: 20
PHP pm.min_spare_servers: 10
PHP pm.max_spare_servers: 30
PHP request_terminate_timeout: 300
PHP Fastcgi Listen: 127.0.0.1:9000

MySQL (5.5.37) Information:

MySQL User: mysql
MySQL port: 3306
MySQL wait_timeout: 28800
MySQL interactive_timeout: 28800
MySQL Max_used_connections: 21/151
MySQL datadir: /var/lib/mysql/
MySQL socket: /var/run/mysqld/mysqld.sock

EasyEngine (ee) Common Locations:

phpMyAdmin: http://example.com/pma
PHP Status: http://example.com/status
Nginx Status: http://example.com/nginx_status
Opcache & Memcache Status: http://example.com/ee/
EasyEngine Log File: /var/log/easyengine/install.log
EasyEngine Configuration File: /etc/easyengine/ee.conf


#6

Server settings seems fine, please monitor the server log by using following command
tail -f /var/www/example.com/logs/*

In this way you can find the code which cause 504 Gateway timeout.

Also optimise MySQL https://rtcamp.com/tutorials/mysql/mysqltuner/


#7

Hello @jbiggs77,

I hope your query is resolved. I am closing this support ticket for now.

Feel free to create a new support ticket if you have any queries further. :slight_smile:


#8