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