Issue Summary: Flask App Failing to Write Protobuf File Post-Update
Environment: Flask application
Affected Component: File writing operation
File Path: ./ingest/<filename>.pb
Issue Start Date: Two days ago following an update
Description
Our Flask application, which has been running smoothly for months, recently encountered an issue where it fails to write a protobuf file to a designated path (./ingest/<filename>.pb
). This problem surfaced after an update was deployed two days ago. It’s critical to note that the update did not modify any functionality related to file writing operations.
Error Encountered
When attempting to write the protobuf file, the application logs the following error:
ERROR - Unexpected error: [Errno 13] Permission denied: 'ingest/20552478.pb'
Troubleshooting Steps Taken
-
Manual File Creation: SSH was used to access the machine, and an attempt to manually create the file at the specified path succeeded without any issues.
-
Permission Adjustment: Changed the folder’s permissions to
chmod 777
. Despite this adjustment, the error persisted, indicating that permission settings might not be the root cause.
Request for Assistance
We urgently require assistance to resolve this issue as it impacts our application’s functionality. Any insights or recommendations on how to troubleshoot or fix this problem would be greatly appreciated.
My Fly.toml file
primary_region = "ams"
[build]
builder = "paketobuildpacks/builder:base"
[processes]
app = "python -m gunicorn app:app --timeout 90 --access-logfile '-'"
[http_service]
internal_port = 8080
force_https = true
auto_stop_machines = true
auto_start_machines = true
min_machines_running = 2
processes = ["app"]
Additional Notes
- The issue only appeared after a recent update, which did not alter the file writing logic.
- Adjusting folder permissions did not resolve the error.
- Manual file creation via SSH does not encounter the same permission issue.
Thank you for your prompt attention to this matter.