The documentation you're currently reading is for version 2.3.2. Click here to view documentation for the latest stable version.

Enabling Debug Mode

You can enable debug mode for a particular service by starting it with a --debug command line flag or by editing st2.conf config file and setting system.debug setting to True as shown below and restarting all the services using st2ctl restart.

debug = True

When running a service in the debug mode, all the log messages logged under DEBUG log level will also be included in the logs which should make troubleshooting different issues easier. In addition to that, when debug mode is enabled, all the API JSON responses are pretty-formatted and a traceback will also be included in the logs for all the API requests which result in an exception.

Running Single-threaded Services

If you are debugging issues with st2api or st2auth, it may be useful to start a single-threaded worker. You can do so with these commands:

/opt/stackstorm/st2/bin/gunicorn_pecan /opt/stackstorm/st2/lib/python2.7/site-packages/st2api/ -k eventlet -b --workers 1 --threads 1 --graceful-timeout 10 --timeout 30

/opt/stackstorm/st2/bin/gunicorn_pecan /opt/stackstorm/st2/lib/python2.7/site-packages/st2auth/ -k eventlet -b --workers 1 --threads 1 --graceful-timeout 10 --timeout 30