Share

Additional Troubleshooting for Flow Production Tracking Enterprise Docker

Warning:

Local installations of Flow Production Tracking are no longer offered. This documentation is intended only for those with existing instances of Flow Production Tracking Enterprise Docker. Click here for a list of our current offerings.

asaterisk Contents

Runtime

How to find running containers

  • Don't rely on docker-compose, go directly with docker
  • There can be multiple running app containers
# Top of all the running containers
sudo docker stats

# Expected container not in the stats list? List all containers, regardless of running state
sudo docker ps -a

# Find a running app container by looking for a container where COMMAND contains sg_run_app
sudo docker ps --no-trunc |grep sg_run_app

# Find a running email notifier container by looking for a container where COMMAND contains sg_run_email_notifier
sudo docker ps --no-trunc |grep sg_run_email_notifier

# See running processes inside a container
sudo docker top <container_id>

# More detailed CPU and memory usage for processes inside a container
sudo docker exec <container_id> ps auxf

How to enter the running app container for troubleshooting

# Enter the running container
sudo docker exec -it <container_id> /docker-entrypoint.sh bash

Useful command to run inside the running app container

# Start the ruby console
script/console

# Start psql, you will automatically be connected to the right shotgun database
psql

# Run top
COLUMNS=200 top -c

Passenger-status

# Show passenger processes
sudo docker exec <container_id> sh -c 'passenger-status $(pgrep -of "^/usr/sbin/httpd")'

# Show passenger requests
sudo docker exec <container_id> sh -c 'passenger-status $(pgrep -of "^/usr/sbin/httpd") --show=requests'

How to restart a running app container

sudo docker restart <container_id>

How to find a long-running query and kill it

# Find dbops container ID
sudo docker ps --no-trunc | grep _dbops_

# Show active queries
sudo docker exec <dbops_container_id> psql -c "select pid,datname,xact_start,state,application_name,query from pg_stat_activity where state != 'idle' ORDER BY xact_start ASC"

# Kill query
sudo docker exec <dbops_container_id> psql -c "SELECT pg_cancel_backend(<query_pid>);"

How to get more details about a container

# Find container to get details of:
sudo docker ps
# or, for more detail:
sudo docker container ls --no-trunc


# Get details, and prepare for a large amount of JSON-formatted output:
sudo docker inspect <container_id>

Was this information helpful?