mirror of
https://github.com/Seldaek/monolog.git
synced 2026-04-26 16:15:49 +03:00
[GH-ISSUE #1950] Undefined array key in DeduplicationHandler #839
Labels
No labels
Bug
Documentation
Feature
Needs Work
Support
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/monolog#839
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @markomilivojevic on GitHub (Mar 3, 2025).
Original GitHub issue: https://github.com/Seldaek/monolog/issues/1950
Monolog version 3.6.0
Getting:
Undefined array key 1 on line 117 in file /src/Monolog/Handler/DeduplicationHandler.php
Undefined array key 2 on line 117 in file /src/Monolog/Handler/DeduplicationHandler.php
It happens when there are too many errors in the deduplication file (about 1000) and possibly many requests trying to write to the same file.
@Seldaek commented on GitHub (Mar 15, 2025):
Ok I can see how with concurrent requests it could be that one reads a partially written line perhaps for a new error.. We probably just need to skip invalid lines if it's the last one, and then worst case we'll get duplicate writes. But then we also most likely need to lock the file while writing.