Answer the question
In order to leave comments, you need to log in
How to solve the leak of logs when writing them?
There is a project on Symfony 3.4. Monolog (StreamHandler) is used as a logger and Stackify is additionally integrated.
There is an algorithm, at each step (let's say there are only 4 of them) of which logs are necessarily created (either success or error). The problem is that after passing through the algorithm, several outcomes are possible:
1. There are all 4 entries in the logs (normal state);
2. There is only the first part of the logs (for example, 1 and 2 entries);
3. There is only the last entry (4). The interesting thing is that there is no way they can be recorded without going through the previous steps.
4. There are no logs at all.
Is it possible that when the server is loaded, the log file is mutually blocked by threads and as a result, no records will be written, in the future the thread will fall off on a timeout?
There was a proposal to transfer the logs to RabbitMQ with further processing by a third-party subscriber. In this case, will there be additional excessive load on the server?
Answer the question
In order to leave comments, you need to log in
It's hard to say without more detailed logic and code. You most likely have an error somewhere. Writing to Monolog is in append mode fopen + a , which means (on a POSIX compliant OS):
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question