[syslog-ng] Periodic "Destination timed out, reaping" and disconnection on a write fifo (pipe)
Charles Eidsness
charles at ccxtechnologies.com
Mon Jun 24 11:30:04 UTC 2019
Hi Attila,
Thanks for the response!
It seems like Sagan stops working when the pipe is closed and then
doesn't reopen it, so it stops working on the first closure.
Could this time-reap feature maybe be dropped for fifos? Are there
cases where you are opening multiple fifos, or is it just files?
Regards,
Charles
==
Charles Eidsness
Chief Engineer
CCX Technologies
(613)791-9715
On Mon, 24 Jun 2019 at 05:33, Attila Szakacs (aszakacs)
<Attila.Szakacs at oneidentity.com> wrote:
>
> Hi Charles,
>
> In syslog-ng you can have file, pipe, etc... destinations with templated path. This template can contain time-related values, for example the hour, minute, second when the message was sent.
> We can imagine a scenario, where we want to store the incoming messages in separate files for every minute, so we set the template accordingly. Days gone by, and we opened so many file descriptors, that we reach the kernel FD limit.
> To avoid situations like this, we introduced a global option called time-reap(). It will close the file descriptors, which were not used in a long time. You can set this timeout in seconds, and it is 60 by default.
>
> Unfortunately time-reap() has its flaws.
> The first problem: It can only be set globally, for all destinations.
> The second problem: It can not be disabled. We should be able to disable it, if we are sure, that no problematic templating is set for that destination.
> The third problem: Instead of starting/resetting the timeout when we sent out a message to that destination, the timer is started when the FD is opened/reopened. Additionally, when the timeout runs out, we check if there is any pending message to that destination, which might not be true, if we are not sending anything to that FD in that exact moment.
>
> I plan to fix the first two problems, as they are relatively easy to fix. I will consult with the team.
>
> Regarding your case, you can set time-reap to a really high value, but it still will not make sure, that your pipe will not be closed.
> To find a workaround, could you tell me how impactful this problem is for you? Does sagan work well after the FD is reopened?
>
> Best regards,
> Attila
>
More information about the syslog-ng
mailing list