我们的mongrel集群有一个滚动重启模式,可以向每个正在运行的进程发送USR2信号。
这在大多数情况下效果很好。但偶尔会出现mongrel进程关闭,然后无法重新启动,并出现以下错误:
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/tcphack.rb:12:in
`initialize_without_backlog': Address already in use - bind(2) (Errno::EADDRINUSE)
from /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/tcphack.rb:12:in `initialize'
from /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:93:in `new'
from /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:93:in `initialize'
from /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:139:in `new'
from /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:139:in `listener'
查看mongrel源代码,USR2处理程序在正在运行的服务器上调用同步停止,因此它应该阻塞,直到套接字被释放。
有没有人看到过这个错误?
有没有人有任何可能导致它的想法?