I created a Solaris version of Cory Snavely's workaround from:
http://wiki.dspace.org/index.php/Idle_In_Transaction_Problem
To see detailed process information:
1. you must have update_process_title = on in postgresql.conf
2. be the owner of the process or root
Solaris platform specifics from the PostgreSQL documentation:
"Solaris requires special handling. You must use /usr/ucb/ps, rather than
/bin/ps. You also must use two w flags, not just one. In addition, your
original invocation of the postgres command must have a shorter ps status
display than that provided by each server process. If you fail to do all three
things, the ps output for each server process will be the original postgres
command line. "
Since pgrep and pkill are built on /usr/bin/ps (not /usr/ucb/ps) Cory's
workaround didn't work for me.
I created my own version that does not rely on pgrep or pkill:
/usr/bin/test ` /usr/ucb/ps auxwww | grep '[i]dle in transaction' | \
/usr/bin/wc -l ` -gt 20 && kill -9 `/usr/ucb/ps auxwww | \
grep '[i]dle in transaction' | \
awk '{if(min==""){min=$7}; if($7< min) {min=$7; oldest_id=$2};} END {print
oldest_id}'`
I'm using this on Solaris 10. If anyone else with Solaris would like to try it
out, please let me know the results.
Thanks,
Damian Marinaccio
The Wallace Center
90 Lomb Memorial Drive
Rochester, NY 14623
585-475-7741
[email protected]
CONFIDENTIALITY NOTE: The information transmitted, including attachments, is
intended only for the person(s) or entity to which it is addressed and may
contain confidential and/or privileged material. Any review, retransmission,
dissemination or other use of, or taking of any action in reliance upon this
information by persons or entities other than the intended recipient is
prohibited. If you received this in error, please contact the sender and
destroy any copies of this information.
------------------------------------------------------------------------------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
_______________________________________________
DSpace-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-tech