I'm trying to use FastLegS in a production environment, but even in Staging (i.e. few users) I'm getting a ton of "Unexpected EOF on client connection" errors in my PostGres logs, as well as occasional "FATAL: sorry, too many clients already"; both of which indicate that the connection isn't being closed properly after being used.
I also noticed (could be related, might not be) that FastLegS uses the 'constructor' version of the node-postgres client (ie.. new pg.Client(...)), which does not participate in connection pooling (according to the node-postgres wiki).
I'm wondering what's the right way to be using FL in production, to avoid these errors? I imagine it'll affect app performance pretty significantly if I start letting users hit it, if it's noticeable to just me and a handful of testers.
I've seen the "Unexpected EOF on client connection" error sporadically in our logs, but I've never seen the "FATAL: sorry, too clients already". Which version of Postgres are you running?
I'm still running 8.4. Not sure if the versions make a difference, but I'll try it with 9.0.4 to see if I can reproduce your errors. Either way we will need to move away from the constructor version of the client. I'll make sure that is included in the next update.