Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

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
Open

Unexpected EOF on client connection (x many) #32

pvencill opened this issue Mar 22, 2012 · 4 comments
Labels

Comments

@pvencill
Copy link

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.

@thadclay
Copy link
Collaborator

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?

@pvencill
Copy link
Author

9.0.4
On Mar 26, 2012 11:33 AM, "thadclay" <
[email protected]>
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)

@thadclay
Copy link
Collaborator

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.

@pvencill
Copy link
Author

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 <
[email protected]

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
Labels
Projects
None yet
Development

No branches or pull requests

2 participants