apprei9
By:
apprei9

Nginx (or php5) won't start

June 6, 2014 2.5k views
Hi, Gave restart commands as follows; sudo service php5-fpm restart sudo service nginx restart Server is down immediately after. Any of you guys have an idea of why that happened and how to get going again? Many thanks
5 Answers
Logs are your friends. Check the nginx error log. That should give you some clue as to why it is crashing.
Check the logs, also run top when you start the server to see the load.

Also check to see if you are under DDOS attack run

netstat -plan|grep :80|awk {'print $5'}|cut -d: -f 1|sort|uniq -c|sort -n for port 80

netstat -plan|grep :80|awk {'print $5'}|cut -d: -f 1|sort|uniq -c|sort -n for port 443

If you are being Dos attacked you need to setup a software firewall and ban the ip.

When you run those commands you'll get a list of IPs and a number beside them this number is the number of connections there opening to your web server.
Sorry its

netstat -plan|grep :443|awk {'print $5'}|cut -d: -f 1|sort|uniq -c|sort -n for port 443(ssl)
Like Larry mentioned, the first step to debugging any problem is to check for error messages in the log files. There are many reasons that Nginx might not restart cleanly, without more information there is very little we can do to help. To see the log messages, run:


tail -n 20 /var/log/nginx/error.log

Error log - What can i do to fix this ?

2015/06/15 08:26:00 [emerg] 13778#0: the pool size must be a multiple of 16 in /etc/nginx/nginx.conf:38
2015/06/15 09:16:19 [emerg] 1512#0: the pool size must be a multiple of 16 in /etc/nginx/nginx.conf:38
2015/06/15 09:54:25 [emerg] 9153#0: the pool size must be a multiple of 16 in /etc/nginx/nginx.conf:38
2015/06/15 09:55:10 [emerg] 9224#0: the pool size must be a multiple of 16 in /etc/nginx/nginx.conf:38
2015/06/15 09:59:36 [emerg] 11857#0: the pool size must be a multiple of 16 in /etc/nginx/nginx.conf:38
2015/06/15 10:02:46 [emerg] 1619#0: the pool size must be a multiple of 16 in /etc/nginx/nginx.conf:38
2015/06/15 10:16:54 [emerg] 4071#0: the pool size must be a multiple of 16 in /etc/nginx/nginx.conf:38
2015/06/15 10:23:10 [emerg] 4948#0: the pool size must be a multiple of 16 in /etc/nginx/nginx.conf:38
2015/06/15 10:23:30 [emerg] 4968#0: the pool size must be a multiple of 16 in /etc/nginx/nginx.conf:38
2015/06/15 10:25:23 [emerg] 5047#0: the pool size must be a multiple of 16 in /etc/nginx/nginx.conf:38
2015/06/15 10:35:53 [emerg] 7863#0: the pool size must be a multiple of 16 in /etc/nginx/nginx.conf:38
2015/06/15 10:39:17 [emerg] 8053#0: the pool size must be a multiple of 16 in /etc/nginx/nginx.conf:38
2015/06/15 10:41:16 [emerg] 8319#0: the pool size must be a multiple of 16 in /etc/nginx/nginx.conf:38

Have another answer? Share your knowledge.