unicorn Ruby/Rack server user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
* 502s with Nginx, Unicorn, and Unix Domain Sockets
@ 2009-09-18  4:54 Tom Preston-Werner
  2009-09-18  6:48 ` Eric Wong
  0 siblings, 1 reply; 5+ messages in thread
From: Tom Preston-Werner @ 2009-09-18  4:54 UTC (permalink / raw)
  To: mongrel-unicorn

I'm doing some benchmarking on our new Rackspace frontend machines (8
core, 16GB) and running into some problems with the Unix domain socket
setup. At high request rates (on simple pages) I'm getting a lot of
HTTP 502 errors from Nginx. Nothing shows up in the Unicorn error log,
but Nginx has the following in its error log:

2009/09/17 19:36:52 [error] 28277#0: *524824 connect() to
unix:/data/github/current/tmp/sockets/unicorn.sock failed (11:
Resource temporarily unavailable) while connecting to upstream,
client: 172.17.1.5, server: github.com, request: "GET /site/junk
HTTP/1.1", upstream:
"http://unix:/data/github/current/tmp/sockets/unic
orn.sock:/site/junk", host: "github.com"

This problem does not exist with the nginx -> haproxy -> unicorn
setup. Thinking this might be a file descriptor problem, I upped the
fd limit to 32768 with no luck. Then I tried upping net.core.somaxconn
to 262144 which also had no effect. I thought I'd ask about the
problem here to see if anyone knows a simple solution that I'm
missing. Perhaps there is an Nginx configuration directive I need?
Thanks. Unicorn rocks!

Tom

--
Tom Preston-Werner
GitHub Cofounder
http://tom.preston-werner.com
github.com/mojombo

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-09-19 22:09 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-18  4:54 502s with Nginx, Unicorn, and Unix Domain Sockets Tom Preston-Werner
2009-09-18  6:48 ` Eric Wong
2009-09-19  2:30   ` Eric Wong
2009-09-19 20:23   ` Tom Preston-Werner
2009-09-19 22:08     ` Eric Wong

Code repositories for project(s) associated with this public inbox

	https://yhbt.net/unicorn.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).