Skip to content

fix(ingress): enable unbuffered Python output for real-time logging#82

Merged
kvinwang merged 1 commit intomainfrom
fix/ingress-python-unbuffered
Mar 2, 2026
Merged

fix(ingress): enable unbuffered Python output for real-time logging#82
kvinwang merged 1 commit intomainfrom
fix/ingress-python-unbuffered

Conversation

@kvinwang
Copy link
Collaborator

@kvinwang kvinwang commented Mar 2, 2026

Summary

  • Add PYTHONUNBUFFERED=1 to Dockerfile

Python stdout is fully buffered in containers (piped, not a terminal). This causes certman.py log output to be delayed and flushed in batches, making it look like there are multi-minute gaps in execution when in reality the delay is from certbot's DNS propagation wait.

Test plan

  • Deploy and check that Python log lines appear in real-time instead of in batches

Python stdout is fully buffered when not connected to a terminal (e.g.
in Docker containers). This causes log output to be delayed and appear
in batches, making it hard to diagnose timing issues.

Set PYTHONUNBUFFERED=1 so print() output appears immediately in
container logs.
@kvinwang kvinwang force-pushed the fix/ingress-python-unbuffered branch from c9a3505 to 3d32bef Compare March 2, 2026 02:35
@kvinwang kvinwang merged commit a690aa3 into main Mar 2, 2026
6 checks passed
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.

1 participant