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

Race condition on log file writing #67

Closed
koladev32 opened this issue May 29, 2024 · 0 comments · Fixed by #70
Closed

Race condition on log file writing #67

koladev32 opened this issue May 29, 2024 · 0 comments · Fixed by #70
Assignees
Labels
bug Something isn't working

Comments

@koladev32
Copy link
Collaborator

Describe the bug
When we have too many requests and errors happening, the file handle is closed prematurely, or we have concurrent access to the file without proper synchronization. This creates the following error

2024-05-29T06:21:14.451427166Z Failed to write to log, write 2024-05-29.log: file already closed

Expected behavior
Logging should be done without issue in the file.

Additional context
We will fix the error by ensuring the file is written and accessible only by one goroutine at a time.

@koladev32 koladev32 added the bug Something isn't working label May 29, 2024
@koladev32 koladev32 self-assigned this May 29, 2024
@koladev32 koladev32 linked a pull request May 29, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant