pg.ddx.io pgsql-interfaces@postgresql.org mailing list archive
help / color / mirror / Atom feedDBD-pg - server closed the connection unexpectedly
6+ messages / 5 participants
[nested] [flat]
* DBD-pg - server closed the connection unexpectedly
@ 2007-03-07 16:12 Frank Bax <fbax@sympatico.ca>
0 siblings, 3 replies; 6+ messages in thread
From: Frank Bax @ 2007-03-07 16:12 UTC (permalink / raw)
To: pgsql-interfaces
OpenBSD 4.1-beta; pg 8.2.3; p5-DBI-1.53; p5-DBD-Pg-1.47
Here is a portion of my script. The system() call executes successfully
once, then script crashes. Any ideas why this would happen. This script
has run without issue on platform where all above software was older versions.
my $val='A B C';
my $sql="UPDATE suit_query SET head=?,neck=? WHERE username=? AND qry=?";
$sth=$dbc->prepare($sql);
foreach my $h (split(' ',$val)) {
foreach my $n (split(' ',$val)) {
$sth->execute( "$h%", "$n%", $usr, $qry );
$cmd="(date;nice -15 ./suits.pl $dbx $dbn $usr $qry;date)";
print( "$cmd > txt/$usr.$qry$h$n\n" );
system( "$cmd > txt/$usr.$qry$h$n" );
}
}
$dbc->disconnect();
Output from script:
(date;nice -15 ./suits.pl RL fbax Combined 200;date) > txt/Combined.200AA
DBD::Pg::st execute failed: server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
DBD::Pg::st execute failed: server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
/suits.pl is a long running script and also accesses pg database through
DBD-pg...
$ grep 2007 txt/Combined.200AA
Fri Mar 2 14:10:04 EST 2007
Sat Mar 3 02:29:34 EST 2007
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: DBD-pg - server closed the connection unexpectedly
@ 2007-03-07 20:20 Tom Lane <tgl@sss.pgh.pa.us>
parent: Frank Bax <fbax@sympatico.ca>
2 siblings, 0 replies; 6+ messages in thread
From: Tom Lane @ 2007-03-07 20:20 UTC (permalink / raw)
To: Frank Bax <fbax@sympatico.ca>; +Cc: pgsql-interfaces
Frank Bax <fbax@sympatico.ca> writes:
> Here is a portion of my script. The system() call executes successfully
> once, then script crashes. Any ideas why this would happen.
What shows up in the postmaster log? Can you get a stack trace from the
(presumably) crashing backend?
regards, tom lane
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: DBD-pg - server closed the connection unexpectedly
@ 2007-03-08 15:55 Greg Sabino Mullane <greg@turnstep.com>
parent: Frank Bax <fbax@sympatico.ca>
2 siblings, 0 replies; 6+ messages in thread
From: Greg Sabino Mullane @ 2007-03-08 15:55 UTC (permalink / raw)
To: pgsql-interfaces
-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160
> Here is a portion of my script. The system() call executes successfully
> once, then script crashes. Any ideas why this would happen. This script
> has run without issue on platform where all above software was older versions.
...
> /suits.pl is a long running script and also accesses pg database through
> DBD-pg...
There are really too many unknowns to say for sure. If you can narrow it
down to a simple reproducible test case, that would help a lot. Please also
try the latest DBD::Pg (1.49) and see if that clears up the problem.
- --
Greg Sabino Mullane greg@turnstep.com
PGP Key: 0x14964AC8 200703081051
http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8
-----BEGIN PGP SIGNATURE-----
iD8DBQFF8DD9vJuQZxSWSsgRA3EZAJkBrgMPumNREzYsQ9NkLu8k2Z6CzQCfT8Uh
3XKNN55q3pIgXLZH5v6p6q0=
=qhAm
-----END PGP SIGNATURE-----
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: DBD-pg - server closed the connection unexpectedly
@ 2007-03-09 13:44 Frank Bax <fbax@sympatico.ca>
parent: Frank Bax <fbax@sympatico.ca>
2 siblings, 2 replies; 6+ messages in thread
From: Frank Bax @ 2007-03-09 13:44 UTC (permalink / raw)
To: pgsql-interfaces
At 03:20 PM 3/7/07, Tom Lane wrote:
>Frank Bax <fbax@sympatico.ca> writes:
> > Here is a portion of my script. The system() call executes successfully
> > once, then script crashes. Any ideas why this would happen.
>
>What shows up in the postmaster log? Can you get a stack trace from the
>(presumably) crashing backend?
Backend is not crashing. When I looked at log on this busy system, I found
out this version is producing numerous warnings about escape sequences in
other scripts. I will attempt to clean that up; so I can isolate
messages. I see a few messages about "unexpected EOF on client
connection"; but I am not certain that they are from my problem script.
I will also try Greg's suggestion about creating a "simple reproducible
test case".
BTW: is there a way to timestamp the messages in log?
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: DBD-pg - server closed the connection unexpectedly
@ 2007-03-09 14:08 Alvaro Herrera <alvherre@commandprompt.com>
parent: Frank Bax <fbax@sympatico.ca>
1 sibling, 0 replies; 6+ messages in thread
From: Alvaro Herrera @ 2007-03-09 14:08 UTC (permalink / raw)
To: Frank Bax <fbax@sympatico.ca>; +Cc: pgsql-interfaces
Frank Bax wrote:
> BTW: is there a way to timestamp the messages in log?
Sure, use %t in log_line_prefix (there is also an escape sequence to get
microseconds, but I forget it).
--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: DBD-pg - server closed the connection unexpectedly
@ 2007-03-10 00:56 Jeff Davis <pgsql@j-davis.com>
parent: Frank Bax <fbax@sympatico.ca>
1 sibling, 0 replies; 6+ messages in thread
From: Jeff Davis @ 2007-03-10 00:56 UTC (permalink / raw)
To: Frank Bax <fbax@sympatico.ca>; +Cc: pgsql-interfaces
On Fri, 2007-03-09 at 08:44 -0500, Frank Bax wrote:
> At 03:20 PM 3/7/07, Tom Lane wrote:
>
> >Frank Bax <fbax@sympatico.ca> writes:
> > > Here is a portion of my script. The system() call executes successfully
> > > once, then script crashes. Any ideas why this would happen.
> >
> >What shows up in the postmaster log? Can you get a stack trace from the
> >(presumably) crashing backend?
>
>
> Backend is not crashing. When I looked at log on this busy system, I found
> out this version is producing numerous warnings about escape sequences in
> other scripts. I will attempt to clean that up; so I can isolate
> messages. I see a few messages about "unexpected EOF on client
> connection"; but I am not certain that they are from my problem script.
I had a problem with similar symptoms on FreeBSD where a kernel bug
caused a protocol violation. I am using SSL, and messages like "Host is
down" appeared in the server logs. I'm not sure what exactly happens
when not using SSL.
The problem is described here:
http://www.freebsd.org/cgi/query-pr.cgi?pr=100172
Thanks to AndrewSN for tracking it down originally.
However, you need to post more information to determine the real cause.
Regards,
Jeff Davis
^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2007-03-10 00:56 UTC | newest]
Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2007-03-07 16:12 DBD-pg - server closed the connection unexpectedly Frank Bax <fbax@sympatico.ca>
2007-03-07 20:20 ` Tom Lane <tgl@sss.pgh.pa.us>
2007-03-08 15:55 ` Greg Sabino Mullane <greg@turnstep.com>
2007-03-09 13:44 ` Frank Bax <fbax@sympatico.ca>
2007-03-09 14:08 ` Alvaro Herrera <alvherre@commandprompt.com>
2007-03-10 00:56 ` Jeff Davis <pgsql@j-davis.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox