Debugging

Convox provides several tools to debug your running applications.

convox logs

You can view all of the output of your application's processes using convox logs:

$ convox logs
2025-01-15T14:32:00Z service/web/4f0d9a3c1b2e7f6a8d905e3c8576b942 10.0.1.242 - - [15/Jan/2025:14:32:00 +0000] "GET / HTTP/1.1" 200 70 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"
2025-01-15T14:32:00Z service/web/4f0d9a3c1b2e7f6a8d905e3c8576b942 10.0.1.242 - - [15/Jan/2025:14:32:00 +0000] "GET / HTTP/1.0" 200 70 0.0019

convox exec

You can get an active shell into a running process using convox exec. First, find the ID of the process:

$ convox ps
ID            SERVICE  STATUS   RELEASE      STARTED     COMMAND
310481bf223f  web      running  RSPZQWVWGOP  5 days ago  bin/web
5e3c8576b942  web      running  RSPZQWVWGOP  4 days ago  bin/web
$ convox exec 5e3c8576b942 bash
/app #

You can use this shell to examine your running application in detail.

convox instances ssh

You can also gain access to the individual instances that make up your Rack. First, find the ID of the instance:

$ convox instances
ID          AGENT  STATUS  STARTED      PS  CPU    MEM
i-0234d285  on     active  6 days ago   5   0.00%  12.36%
i-14cd0a89  on     active  7 hours ago  2   0.00%  5.18%
i-d8740c43  on     active  5 days ago   4   0.00%  21.04%
$ convox instances ssh i-0234d285
[ec2-user@ip-10-0-3-209 ~]$

Note: Before you can use convox instances ssh the first time, you will need to run convox instances keyroll to load an SSH key onto your Rack instances.

convox restart

If all else fails and you wish to restart all running instances of your App you can perform a remote restart from the CLI with:

$ convox restart -a app1

Or to restart only the web service processes, run:

$ convox services restart web -a app1

See Also