• 5 Subscribers

I have a set of scripts (mostly Perl and csh) that I need to run consecutively, with a new argument in each pass.

Many of the scripts make calls to a PostgreSQL database, and some of them must be run multiple times.

Some of these runs will go off without a hitch, until, ~5 runs in, a Perl database call is made, a la

my $query = "SELECT ... FROM ... WHERE ...;

my $array_ref = $dbh->selectall_arrayref($query);

but returns nothing, even though this same query outside the programs returns 20+ rows of data. The same program call can be made by itself and will work fine.

I thought it may be a matter of overflowing the database engine (i.e. all available ports were occupied) so I installed PgBouncer.

I have checked pgbouncer.log, and noticed no real errors associated with this, except every so often, a:

closing because: unclean server (age=***)


Does anyone have any suggestions, or have they encountered something like this before?

0 answers in total

Answer this questsion