-
-
Notifications
You must be signed in to change notification settings - Fork 782
Add gunicorn logging config for all the API services which run under gunicorn #4206
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gunicorn (st2api, st2auth, st2stream). In production, those services run in a worker subprocess which is managed by gunicorn master process. If we don't have a special logging config file for gunicorn worker processes, some messages which are produced by gunicorn workers are lost. This makes debugging and other things a lot harder.
Kami
added a commit
to StackStorm/st2-packages
that referenced
this pull request
Jun 27, 2018
API based services. This way we don't miss various log messages generated by gunicorn worker processes. Corresponding StackStorm/st2 change: StackStorm/st2#4206
Member
Author
|
Corresponding st2-packages PR - StackStorm/st2-packages#568 |
bigmstone
approved these changes
Jun 27, 2018
Contributor
bigmstone
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
blag
approved these changes
Jun 27, 2018
Contributor
blag
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
cognifloyd
pushed a commit
that referenced
this pull request
Feb 16, 2025
… API based services. This way we don't miss various log messages generated by gunicorn worker processes. Corresponding StackStorm/st2 change: #4206 Cherry-picked from StackStorm/st2-packages@1c1a704
cognifloyd
pushed a commit
that referenced
this pull request
Feb 17, 2025
… API based services. This way we don't miss various log messages generated by gunicorn worker processes. Corresponding StackStorm/st2 change: #4206 Cherry-picked from StackStorm/st2-packages@1c1a704
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
While testing the release, I encountered an edge case with gunicorn worker log messages.
We don't specify a special logging config which is to be used by gunicorn worker processes. This means that if an error or similar occurs in a worker process during start up, those errors are ignored in production and not logged to the corresponding service log file.
This makes a lot of config file related troubleshooting hard since error messages are simply not logged anywhere.
It looks like this issue has existed for a while and it only affects production (and not dev environment) which API services run under gunicorn process.
I personally view this as a blocker and need to merge for v2.8.0 release.
Corresponding st2-packages pull request / change is work in progress.
Example log file before this change:
As you can see, everything looks fine yet service failed to start due to the configuration error. Problem is the error is simply lost and not logged anywhere.
And after this change: