We are running Apache/2.2.10 (Linux/SUSE) mod_ssl/2.2.10 OpenSSL/0.9.8h mod_perl/2.0.4 Perl/v5.10.0 wirh DBD::Pg 2.18.1 and Apache::DBI 1.11 on SLES11 SP1.

Postgres 8.3.14 listens on TCP port 5432 and named socket /tmp/.s.PGSQL.5432

I see intermittent messages in my web server error log which occur under light or heavy load.

-e: DBD::Pg::st execute failed: could not receive data from server: Socket operation on non-socket at ...(my module)...
-e: DBD::Pg::db rollback failed: could not receive data from server: Socket operation on non-socket at /usr/lib/perl5/site_perl/5.10.0/Apache/DBI.pm line 268

It is as if the httpd2-prefork processes are trying to use connections that have "gone stale".

Restarting apache2 will stop the messages but they sometimes come back within minutes, most times it will be hours before the problem recurs. Anyone, seen this?


In reply to apache2 mod_perl DBD/DBI postgres connection problems by otter117

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.