Index: openacs-4/packages/acs-core-docs/www/xml/install-guide/maintenance.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/xml/install-guide/maintenance.xml,v diff -u -r1.23 -r1.24 --- openacs-4/packages/acs-core-docs/www/xml/install-guide/maintenance.xml 15 Nov 2004 17:41:01 -0000 1.23 +++ openacs-4/packages/acs-core-docs/www/xml/install-guide/maintenance.xml 13 Jan 2005 13:55:17 -0000 1.24 @@ -124,7 +124,7 @@ At this point, these commands will work only for the root user. Grant permission for the web group to use svc commands on the $OPENACS_SERVICE_NAME server. - [root root]# svgroup web /service/$OPENACS_SERVICE_NAME + [root root]# /usr/local/bin/svgroup web /service/$OPENACS_SERVICE_NAME [root root]# @@ -728,6 +728,8 @@ + + Identify a runaway Oracle query: first, use ps aux or top to get the UNIX process ID of a runaway Oracle process. Log in to SQL*Plus as the admin: @@ -765,6 +767,31 @@ alter system kill session 'SID,SERIAL#'; --substitute values for SID and SERIAL# (See Andrew Piskorski's Oracle notes) + + + Identify a runaway Postgres query. First, logging must be enabled in the database. This imposes a performance penalty and should not be done in normal operation. + Edit the file postgresql.conf - its location depends on the PostGreSQL installation - and change + #stats_command_string = false + to + stats_command_string = true + Next, connect to postgres (psql service0) and select * from pg_stat_activity;. Typical output should look like: + + datid | datname | procpid | usesysid | usename | current_query +----------+-------------+---------+----------+---------+----------------- + 64344418 | openacs.org | 14122 | 101 | nsadmin | <IDLE> + 64344418 | openacs.org | 14123 | 101 | nsadmin | + delete + from acs_mail_lite_queue + where message_id = '2478608'; + 64344418 | openacs.org | 14124 | 101 | nsadmin | <IDLE> + 64344418 | openacs.org | 14137 | 101 | nsadmin | <IDLE> + 64344418 | openacs.org | 14139 | 101 | nsadmin | <IDLE> + 64344418 | openacs.org | 14309 | 101 | nsadmin | <IDLE> + 64344418 | openacs.org | 14311 | 101 | nsadmin | <IDLE> + 64344418 | openacs.org | 14549 | 101 | nsadmin | <IDLE> +(8 rows) +openacs.org=> +