guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Broken pipe errors using guile-pg with guile 1.8


From: Greg Troxel
Subject: Re: Broken pipe errors using guile-pg with guile 1.8
Date: Mon, 23 Feb 2009 12:06:56 -0500
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/22.3 (berkeley-unix)

Sebastian Tennant <address@hidden> writes:

> Hi Guilers,
>
> Is anyone familiar with the internals of guile-pg (version 0.16, author
> Ian Grant) which wraps PostgreSQL's libpq?

By 0.16, I think you mean ttn's version of Ian Grant's abandoned 0.07 or
so.

> I'm getting a lot of 'broken pipe' errors of the sort:
>
>  Feb 23 11:32:13 stderr: ERROR: In procedure pg-connectdb:
>  Feb 23 11:32:13 stderr: ERROR: could not send startup packet: Broken pipe
>
> It's especially bad at times of light load (rather than no load) and I
> never once noticed this error whilst the webapp was in development
> (i.e., I was the only person using it) which suggests to me that it's
> happening whenever two or more page requests call scripts that attempt
> to open database connections more or less at the same time.
>
> All my calls to pg-connectdb are let bound so database connections are
> (supposed to be) closed after every query.

I am not sure that gc will run as soon as you drop the reference, so you
might want to force gc, or better yet explicitly close the db object.
You could add a debug printf in the free/close function to check this
hypothesis, but I think you should be explicitly closing the connection
- gc should only be for memory, not external state - there's no hook to
run gc when guile is out of file descriptors, for example.

> Any advice very much appreciated.  I've attached a log extract to give
> you an idea of the frequency of failures.  I need to find a solution to
> this problem fast!
>
> Seb
>
> P.S. Perhaps upgrading guile-pg is the first thing I should try? IIRC
>      there's a more recent pkgsrc version (which is guile 1.8
>      comaptible) somewhere... hunting for it now.

I suspect a day or so of work would suffice to make the most recent
guile-pg work with 1.8.  If you do it definitely post patches.

Attachment: pgpQcKHRrVqDD.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]