Skip to content
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

Use unbuffered stdout for containers #19

Merged
merged 1 commit into from
Jun 30, 2017

Conversation

mars-f
Copy link
Contributor

@mars-f mars-f commented Jun 30, 2017

Use unbuffered stdout for all containers. In dev this makes print()
statements work. In prod using unbuffered output for daemons is just
plain good practice.

Use unbuffered stdout for all containers.  In dev this makes print()
statements work.  In prod using unbuffered output for daemons is just
plain good practice.
@mars-f mars-f requested a review from purelogiq June 30, 2017 19:00
@@ -11,6 +11,8 @@ CMD ["/usr/local/bin/uwsgi"]

RUN addgroup -g 10001 app && adduser -D -u 10001 -G app -h /app app

ENV PYTHONUNBUFFERED=1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't need this in production. In production we will be using mozlog which doesn't have this problem. (And I'm unsure what this will do in production, do you think it is fine to have in prod??)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nevermind, I see your comment at the top!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, in prod it's even more important to not lose output because of a buffer. You never know when there will be a message in a buffer somewhere that's critical to debugging a problem, and you'll spend days pulling your hair out trying to figure out why there is no error message before the crash. 😄 😢

@mars-f mars-f merged commit 0023c26 into mozilla-conduit:master Jun 30, 2017
@mars-f mars-f deleted the use-unbuffered-stdout branch June 30, 2017 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants