danielme85 / laravel-log-to-db

Custom Laravel and Lumen 5.6+ Log channel handler that can store log events to SQL or MongoDB databases. Uses Laravel/Monolog native logging functionality.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Infinite circular log writes on database exception inside the job

Manriel opened this issue · comments

In case database failure, once the exception rises inside the job, on attempt to write the log entity to the database, it generates a new log write event, that is pushing to the log queue and attempt to write a new log entity to the database again, that will cause another exception at the same place, and so on.

It immediately cause the water flow cascade effect on the queue, and it's overflow and fail because OOM.

@Manriel I've merged your fix into main branch. I'll tag a new version release after some practical testing. Thanks for your help!

fixed in v4.1.0