This site is in read only mode. Please continue to browse, but replying, likes, and other actions are disabled for now.

⚠️ We've moved!

Hi there!

To reduce project dependency on 3rd party paid services the StackStorm TSC has decided to move the Q/A from this forum to Github Discussions. This will make user experience better integrated with the native Github flow, as well as the questions closer to the community where they can provide answers.

Use 🔗 Github Discussions to ask your questions.

Gunicorn timeout configuration

Hi,

I need your help!

When I call the api https://myUrl/auth/v1/tokens i’m getting an error “Nginx is unable to reach st2auth.”. This error is intermittent, when it reaches 30 seconds it gives an error, if the time is less than 30s I get the token successfully.
Typically occurs on the first invocation, the following ones are succeeded in milliseconds.

I think changing Gunicorn’s default from 30 to 60 might solve the problem.
My question is how to change Gunicorn’s default setting from 30 seconds to 60?

Error in var/log/st2/st2auth.log:
[CRITICAL] WORKER TIMEOUT

API Response:
Status: 503 - Service Temporarily Unavailable - Time:30.90s - Size:307 B
“faultstring”: “Nginx is unable to reach st2auth. Make sure service is running.”

The gunicorn parameters such as timeout are set in the st2auth systemd service file in the Environment parameter, e.g.

Environment="DAEMON_ARGS=-k eventlet -b 127.0.0.1:9100 --workers 1 --threads 1 --graceful-timeout 10 --timeout 30 --log-config /etc/st2/logging.auth.gunicorn.conf --error-logfile /var/log/st2/st2auth.log"
EnvironmentFile=-/etc/sysconfig/st2auth
ExecStart=/opt/stackstorm/st2/bin/gunicorn st2auth.wsgi:application $DAEMON_ARGS

1 Like