News for hackers. Stuff that matters.
Re:Costs of a PostgreSQL connection by smilliken on Wednesday February 19, 2014 @02:16PM (#7265533)
> We were running out of file handles which caused the database to crash

Most distributions ship with conservative defaults for the maximum number of concurrent file descriptors and socket connections. Especially for a database server, it's wise to tune these values before optimizing anything else.

> 1000 files per connection * 370 = 370,000 files

This is a very pessimistic estimate, in reality you'll need much less than 1000 file descriptors per connection. As long as you tune your file descriptor limit, you should be able to handle one or two orders of magnitude more connections than this.

A few resources that might help:

http://serverfault.com/questions/92723/file-descriptors-sett...

http://www.cyberciti.biz/faq/linux-increase-the-maximum-numb...

http://stackoverflow.com/questions/2569620/socket-accept-err...

Re:Costs of a PostgreSQL connection by _hans_ on Wednesday February 19, 2014 @02:47PM (#7265760)
Thank you. We configured the system to accept more file descriptors. I think our issue was caused by something else.