vladgh / VladGh.com-LEMP

Latest NginX, MySQL, PHP (with APC and Suhosin)
http://vladgh.com/blog/install-nginx-and-php-php-fpm-mysql-and-apc
Apache License 2.0
160 stars 41 forks source link

Script can't restart nginx after upgrade #45

Closed multiformeingegno closed 11 years ago

multiformeingegno commented 11 years ago

When I run ext/nginx_update.sh 1.5.0 (example), it works but at the end I receive a ton of:

[emerg]: bind() to 0.0.0.0:80 failed (98: Address already in use)
[emerg]: bind() to 0.0.0.0:80 failed (98: Address already in use)
[emerg]: bind() to 0.0.0.0:80 failed (98: Address already in use)
[emerg]: bind() to 0.0.0.0:80 failed (98: Address already in use)

... and nginx get stuck (doesn't respond at all).

To solve I have to run: sudo fuser -k 80/tcp ; sudo service nginx restart

P.S.: I was able to reproduced this even today after running a "git pull" and using the latest version of the script.

Reference: http://vladgh.com/blog/install-nginx-and-php-php-fpm-mysql-and-apc#comment-874411942

vladgh commented 11 years ago

The commit I made last week should of taken care of this error (32709733f53a841f4360b4345ffed26bab7e5296). I will do some more tests and try a more aggressive way of shutting down the processes during restart.