[GH-ISSUE #1653] Bad file descriptor on line 133 in file StreamHandler.php #707

Closed
opened 2026-03-04 02:17:15 +03:00 by kerem · 1 comment
Owner

Originally created by @ferdbags on GitHub (Apr 14, 2022).
Original GitHub issue: https://github.com/Seldaek/monolog/issues/1653

Monolog version 2.5

Hey guys,

We are occasionally getting the following from StreamHandler. Any suggestions would be greatly appreciated. I assume it's a permissions or locking issue but am unsure how best to approach it.

[2022-04-14 16:55:31] api.NOTICE: Error number [8] fwrite(): write of 123 bytes failed with errno=9 Bad file descriptor on line 133 in file E:\websites\app\vendor\monolog\monolog\src\Monolog\Handler\StreamHandler.php {"url_trimmed":"123456789"} {"uid":"4a7f141"}

Originally created by @ferdbags on GitHub (Apr 14, 2022). Original GitHub issue: https://github.com/Seldaek/monolog/issues/1653 Monolog version 2.5 Hey guys, We are occasionally getting the following from StreamHandler. Any suggestions would be greatly appreciated. I assume it's a permissions or locking issue but am unsure how best to approach it. [2022-04-14 16:55:31] api.NOTICE: Error number [8] fwrite(): write of 123 bytes failed with errno=9 Bad file descriptor on line 133 in file E:\websites\app\vendor\monolog\monolog\src\Monolog\Handler\StreamHandler.php {"url_trimmed":"123456789"} {"uid":"4a7f141"}
kerem 2026-03-04 02:17:15 +03:00
  • closed this issue
  • added the
    Support
    label
Author
Owner

@Seldaek commented on GitHub (May 3, 2022):

Is this using long running processes? Only on windows? It most likely happens because the file gets closed by the OS somehow, so it fails to write to the open file handle it's got.

<!-- gh-comment-id:1116452063 --> @Seldaek commented on GitHub (May 3, 2022): Is this using long running processes? Only on windows? It most likely happens because the file gets closed by the OS somehow, so it fails to write to the open file handle it's got.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/monolog#707
No description provided.