Closed NiroDeveloper closed 4 months ago
@driesvints This is a different problem then https://github.com/laravel/octane/issues/724, this could also generate problems while using other monolog handlers like StreamHandler, SocketHandler or SyslogHandler.
Thank you for reporting this issue!
As Laravel is an open source project, we rely on the community to help us diagnose and fix issues as it is not possible to research and fix every issue reported to us via GitHub.
If possible, please make a pull request fixing the issue you have described, along with corresponding tests. All pull requests are promptly reviewed by the Laravel team.
Thank you!
Octane Version
2.3.4
Laravel Version
10.46.0
PHP Version
8.1.27
What server type are you using?
Swoole
Server Version
5.1.2
Database Driver & Version
No response
Description
Laravel uses Monolog for logging, some monolog handler have a important
close()
function. Octane does never call this function! In normal laravel applications, monolog calls close by itself via__destruct()
. It seams like__destruct()
is never called in Swoole and it could be sensible to callclose()
after every request.Taking into account that there is currently only one workaround to write performant logs: https://github.com/laravel/octane/issues/724#issuecomment-1649617729 In this case the
ProcessHandler::close()
is never called and laravel will spawn endlesscat
processes.Steps To Reproduce
close()
call, like in https://github.com/laravel/octane/issues/724#issuecomment-1649617729ps
and see that for every request acat
process was created but not closed.