Permalink
Browse files

Increase default socket backlog to 1024, SOMAXCONN is usually 128 whi…

…ch is too low. Fixes issue #413.
  • Loading branch information...
1 parent 5acbaf8 commit 053150e3363cc11c29bbb20daa4c2e4d5ce6098d @FooBarWidget FooBarWidget committed Nov 17, 2009
Showing with 5 additions and 5 deletions.
  1. +4 −0 NEWS
  2. +1 −5 ext/common/Utils.cpp
View
4 NEWS
@@ -8,6 +8,10 @@ Release 2.2.6
malfunction, requiring a web server restart. Measures have now been
taken to prevent those tmp cleaner programs from removing anything
in /tmp/passenger.xxx. Issue #365.
+ * The default socket backlog has been increased from 'SOMAXCONN' (which
+ is 128 on most platforms) to 1024. This should fix most
+ 'helper_server.sock failed: Resource temporarily unavailable'
+ errors.
Release 2.2.5
View
@@ -609,11 +609,7 @@ createUnixServer(const char *filename, unsigned int backlogSize, bool autoDelete
}
if (backlogSize == 0) {
- #ifdef SOMAXCONN
- backlogSize = SOMAXCONN;
- #else
- backlogSize = 128;
- #endif
+ backlogSize = 1024;
}
try {
ret = syscalls::listen(fd, backlogSize);

0 comments on commit 053150e

Please sign in to comment.