PGError: Server closed connection unexpectedly
Posted by Prem on January 4th, 2010 filed in PostgreSQLI’ve been struggling with this error for sometime lately. Â The issue goes like this:
I have a web based application developed using Ruby on Rails, that uses PostgreSQL as database.   It works perfectly fine for functions, which retrieves less data.  But for others which has more data, the client (RoR) fails with this error.  And the server log says, Client disconnected prematurely.  But if I keep hitting F5 (Browser Refresh), sometimes the page loads successfully.  Isn’t that awesome?
Google didn’t have any answer for this either.  I could see a lot of people posting this error in many blogs, but I didn’t see any solution that pertains to my problem.
If you have any solution for this, please let me know.
Leave a Comment
You must be logged in to post a comment.