On Monday, June 25, 2012 at 9:02 AM, Manuel Palenciano Guerrero wrote:
> The problem is when upgrading (USR2 + QUIT) our applications. I get the 
> following error very frequently but not always.
>  
> E, [2012-06-21T11:40:48.892002 #29401] ERROR -- : adding listener failed 
> addr=/tmp/unicorn.app.sock (in use)
> /var/www/app/staging/shared/bundle/ruby/1.8/gems/unicorn-4.3.0/lib/unicorn/socket_helper.rb:140:in
>  `initialize': Address already in use - /tmp/unicorn.app.sock 
> (Errno::EADDRINUSE)
>  
> ...and the only way around that I know is stoping and starting the app, even 
> in production.

I've run in to this problem using the included example init.sh script. The 
`sleep 2` on line 48 is too short in some cases. 
(http://bogomips.org/unicorn.git/tree/examples/init.sh#n48)

I use a patched example init script that uses `ps` to monitor the upgrade 
process instead of sleeping:

https://gist.github.com/2988633

It works well for me.

-Aaron


P.S. I've tried to contribute the patch upstream via this list, but it keeps 
getting rejected for having the wrong content type. Then I gave up. I'm fine 
chalking it up to my own stupidity/laziness…just wanted to put it out there 
that contributing could be easier. :-)


_______________________________________________
Unicorn mailing list - [email protected]
http://rubyforge.org/mailman/listinfo/mongrel-unicorn
Do not quote signatures (like this one) or top post when replying

Reply via email to