Hang in PGconn#block while waiting for PGconn#async_exec

Issue #75 resolved
Michael Granger
repo owner created an issue

[via harryv in the #ruby-lang irc channel]

Sometimes a call to PGconn#async_exec will hang for a long period of time, and eventually die with:

{{{ select(4, [3], NULL, NULL, NULL) = -1 EBADF (Bad file descriptor) }}}

This might be related to <<issue 66>>, and might also be the cause of [[https://groups.google.com/d/topic/sequel-talk/hGyN1Ix-TmE/discussion|an issue]] reported on the Sequel-talk mailing list.

Comments (10)

  1. Michael Granger reporter

    I haven't seen the hang myself since I started using 0.11.0 with the patch in 3d744d9776c3 , but of course it's difficult to tell if it's actually fixed or not since I don't have a way to reliably reproduce it. I'm doing an extensive reorganization of the build system at the moment, but once I have that sorted, I'll release 0.11.1 with the aforementioned fix.

  2. jmileham

    Hi Michael,

    I can confirm that this fix works for me.

    I have a Heroku environment that was reproducing 100% of the time (making diagnosis of the root cause difficult). After discovering this thread and cutting a prerelease gem I am now getting appropriate error messages instead of hangs.

  3. Log in to comment