I have a Perl daemon handling some events on a system which inserts or
updates rows in Postgres, and something is causing memory usage to grow. I
see the RSS memory size allocated to the Postgres connection continual
going up (slowly) and the RSS size allocated to the Perl daemon also
continually going up (slowly). The Perl daemon is using DBIx to make insert
and update queries to the Postgres DB.

There is only one connection open between the Perl daemon and the Postgres
DB. That connection stays open until the daemon exits or is killed. When
the daemon is killed, the Postgres back end is terminated and all of its
memory is released.

Any suggestions on how to go about troubleshooting this would be useful.
Most specifically, I would like to know how to find out what the Postgres
process for that connection is doing with all that memory. Is there a way I
can see what the memory is allocated for? Would running GDB on the Postgres
process help? Is there any logging I can turn on which might help shed some
light on what's using the memory? Anything in particular anyone knows about
which I should look for which might cause both Perl and Postgres memory
usage to climb continually?

Thanks in advance for any suggestions.


-- 
Eliot Gable

"We do not inherit the Earth from our ancestors: we borrow it from our
children." ~David Brower

"I decided the words were too conservative for me. We're not borrowing from
our children, we're stealing from them--and it's not even considered to be
a crime." ~David Brower

"Esse oportet ut vivas, non vivere ut edas." (Thou shouldst eat to live;
not live to eat.) ~Marcus Tullius Cicero

Reply via email to