Skip to content

Restart procedure on the production system

Simon Séhier edited this page Nov 14, 2016 · 5 revisions

In case of problem with the prod, we restart tomcat. Before restarting the tomcat instance, please do that:

sudo -u tomcat jstack `pidof java` > stack.txt

On the production DB, run those queries:

\copy (SELECT a.procpid, a.client_addr, a.backend_start, a.xact_start, a.query_start, a.query_start, a.waiting, a.current_query, l.*, c.relname FROM pg_stat_activity a LEFT JOIN pg_locks l ON a.procpid=l.pid LEFT JOIN pg_class c ON c.oid=l.relation WHERE a.current_query <> '<IDLE>' and a.usename='www-data' order by a.procpid, c.relname) TO lock.csv CSV HEADER
Clone this wiki locally