I have a severe problem with my database connection in my web application. Since I use a single database connection for the whole application from singleton Database class,
I've not much experience with PostgreSql, but all the web applications I've worked on have used a single connection per set of actions on a page, closing it and disposing it when finished.
This allows the server to pool connections and stops problems such as the one that you are experiencing.