Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

DBD-pg - server closed the connection unexpectedly




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



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group