Closed ermalguni closed 6 years ago
Lumberjack is used in production in a lot of services. File descriptors have never been a problem before. The file is held open by lumberjack and closed as needed for rotation.
I think the problem must be somewhere else in your code. Are you sure you're not calling this code multiple times? Lumberjack is not idempotent, it's up to you to make sure there's only one instance of the lumberjack Logger in your system.
Sorry for the late reply. You are totally right. I found the bug a few days ago, lumberjack was wrongly initialized in a goroutine :( . Closing this.
I am using lumberjack in conjunction with zerolog like this:
After checking the open files I see that the number of file descriptors is always increasing until it hit the max and you cannot do anything with the system.
This is what I get after (around) 4mins.