Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Unexpected EOF on client connection (x many) #32

Open
pvencill opened this Issue Mar 22, 2012 · 4 comments

Comments

Projects
None yet
2 participants

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.

Collaborator

thadclay commented Mar 26, 2012

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?

9.0.4
On Mar 26, 2012 11:33 AM, "thadclay" <
reply@reply.github.com>
wrote:

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?


Reply to this email directly or view it on GitHub:
#32 (comment)

Collaborator

thadclay commented Mar 26, 2012

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.

Yeah, I went to call pg directly (using the pg.connect() api) from the
highest-use segments of my code, and the problem went away; so it seems
likely that this was the problem.

On Mon, Mar 26, 2012 at 11:48 AM, thadclay <
reply@reply.github.com

wrote:

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.


Reply to this email directly or view it on GitHub:
#32 (comment)

Paul Vencill
Co-Founder CyberStride LLC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment