Tuesday, December 11, 2007

openbsd / too many open files /erro no 24

OpenBSD has a default open file descriptor limit of 64. As such, many of my web apps had been quitting on the "too many open files" error (error 24). To fix this, use the following steps:

1. Edit /etc/login.conf and make sure the openfile limit is set to a larger number than it currently is.

2. Use ulimit -n to set the maximum number of open files. To see current limit, use "ulimit -a".

2 comments:

Myra said...

People should read this.

Anonymous said...

proved helpful for me. thanks!

About Me

My Photo
Princeton, New Jersey, United States
I am a programmer by day and a network admin by night. While my primary specialty is developing secure database driven web applications for FDA regulated industries such as Pharmaceuticals, I am also a network administrator managing both windows and Linux networks. I am very passionate about open source technologies and use them in my daily work life as often as I can.