Re: Weird behaviour on Solaris: recv() returns ENOENT

From: Forest Wilkinson <lyris-pg(at)tibit(dot)com>
To: pgsql-interfaces(at)postgresql(dot)org
Cc: dfs(at)roaringpenguin(dot)com
Subject: Re: Weird behaviour on Solaris: recv() returns ENOENT
Date: 2003-06-27 01:04:00
Message-ID: bv4nfv0ohs0huc08vkl2g9hgt8edlsk6j9@4ax.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

I'm having a similar problem, but instead of ENOENT I'm getting what
appears to be ECONNREFUSED. (PQresultStatus() says "Connection
refused".) This is on a Solaris 9 box, with Postgres 7.3.2 and 7.3.3,
using libpq in a multithreaded program. At the same time, postgres
writes "pq_recvbuf: unexpected EOF on client connection" to syslog
several times.

It seems to occur at random times, just after a perfectly legal query
was issued. I'm looking futher into the program flow in hopes of
discovering a bug, but the problem doesn't show up in the same code
when both the program and postgres are running on linux.

What could be going on here? David, did you ever resolve your
problem?

"David F. Skoll" (dfs(at)roaringpenguin(dot)com) wrote:

>Hi,
>
>I'm having a customer running PostgreSQL 7.2.3 on Solaris 9 with
>PHP 4.3.0, and he's getting this error:
>
> could not receive data from server: No such file or directory
>
>grepping through the libpq source, it appears that the only way this
>message could happen is if recv() returns -1 with errno set to ENOENT.
>This is not one of the documented recv() error codes!
>
>My questions:
>
>1) Has anyone else ever seen this?
>2) Is libpq thread-safe? Do you need to compile with special flags to
> make it thread-safe? My first guess is that he's using a multithreaded
> version of PHP (with iPlanet Web server) and errno is not behaving properly.
>
>Regards,
>
>David.

Responses

Browse pgsql-interfaces by date

  From Date Subject
Next Message AgentM 2003-06-27 01:58:18 Re: ECPG thread success (kind of) on Linux
Previous Message Philip Yarra 2003-06-27 00:45:46 ECPG thread success (kind of) on Linux