Skip to content

Commit

Permalink
The server will try to raise the file descriptors limit to 4096 from
Browse files Browse the repository at this point in the history
now on. The default system value was way too low in many cases.


git-svn-id: svn://cherokee-project.com/cherokee/trunk@3509 5dc97367-97f1-0310-9951-d761b3857238
  • Loading branch information
alobbs committed Aug 4, 2009
1 parent 3e04141 commit 1116555
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions cherokee/macros.h
Expand Up @@ -108,10 +108,11 @@
#define NONCE_CLEANUP_LAPSE 60
#define NONCE_EXPIRATION 60

#define FD_NUM_SPARE 10 /* range: 8 - 20 */
#define FD_NUM_MIN_SYSTEM 20 /* range: 16 - 64 */
#define FD_NUM_MIN_AVAILABLE 8 /* range: 8 ... 65000 */
#define FD_NUM_MIN_PER_THREAD 8 /* range: 8 ... 65000 */
#define FD_NUM_SPARE 10 /* range: 8 ... 20 */
#define FD_NUM_MIN_SYSTEM 20 /* range: 16 ... 64 */
#define FD_NUM_MIN_AVAILABLE 8 /* range: 8 ... 65000 */
#define FD_NUM_MIN_PER_THREAD 8 /* range: 8 ... 65000 */
#define FD_NUM_CUSTOM_LIMIT 4096 /* range: 16 ... 65000 */

#define EXIT_OK 0
#define EXIT_ERROR 1
Expand Down
2 changes: 1 addition & 1 deletion cherokee/server.c
Expand Up @@ -133,7 +133,7 @@ cherokee_server_new (cherokee_server_t **srv)
n->group_orig = getgid();
n->group = n->group_orig;

n->fdlimit_custom = -1;
n->fdlimit_custom = FD_NUM_CUSTOM_LIMIT;
n->fdlimit_available = -1;

n->conns_max = 0;
Expand Down

0 comments on commit 1116555

Please sign in to comment.