-
Notifications
You must be signed in to change notification settings - Fork 701
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
log.io-file-input stops transmitting to log.io with DailyRollingFileAppender #232
Comments
This is a known limitation of node.js' In the meantime, your options are:
|
Hi Through it is a really nice touch to log the watched files in the log :) I am still linking the streams to specific files: Using a wildcard in the streams: When assigning a different wildcard: If you would have some insights how to fix this problem I am all ears :) Because maybe there is a quick fix for that that I have not even thought about. |
How many files are in your |
Additionally, could you post a list of the filenames in that directory if it's not too long / private? |
Yes, hi :) Currently I have about 300 files from one application (I am also using logbrowser so it is nice to have logs from some period of time. So when configuring: When I use (which I have not tested because it seems a bit much): I have also tried the approach: The logs did wrote for a few seconds, but unfortunately this yielded the error below. And maybe an info: I have used the former application (which was 6 years old) and it did work there. I have rewritten the dockerfile and configurations for the new app just this week. And of course I have anonymised the logs. Sorry that the messages keep longer and longer, I want to keep the answers as much precise as possible and this requires a lot of text :) Error: FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory <--- Last few GCs ---> [7:0x45a33e0] 115111 ms: Mark-sweep 1398.6 (1425.7) -> 1398.2 (1425.2) MB, 1435.4 / 5.6 ms (+ 0.0 ms in 9 steps since start of marking, biggest step 0.0 ms, walltime since start of marking 1446 ms) (average mu = 0.147, current mu = 0.043) allocation fa[7:0x45a33e0] 115948 ms: Mark-sweep 1399.0 (1425.2) -> 1398.5 (1425.7) MB, 827.0 / 7.5 ms (average mu = 0.097, current mu = 0.012) allocation failure scavenge might not succeed <--- JS stacktrace ---> ==== JS stack trace =========================================
Security context: 0x0cd14411e6c1 1: 0x8fb090 node::Abort() [node] And I have another error: <--- Last few GCs ---> [7:0x31183e0] 108294 ms: Scavenge 1398.1 (1424.7) -> 1397.7 (1425.7) MB, 19.3 / 0.0 ms (average mu = 0.155, current mu = 0.050) allocation failure <--- JS stacktrace ---> ==== JS stack trace =========================================
Security context: 0x3be71d81e6c1 1: 0x8fb090 node::Abort() [node] |
Alright, so I just published a new version (v0.4.15) that I'm hoping solves your original issue. I was able to simulate log rotation by moving a file that was being watched and then creating a new file of the same name. I confirmed that doing this caused the file input to not send messages when the new file was updated. v0.4.15 fixes that behavior. Additionally, I assume you don't actually need to be watching all of the log files in that directory since no new log lines are being written to archived files, only |
Hi |
Hello. |
A couple questions:
|
Hi
I have noticed that the log.io server stops receiving messages from the io-file-input when the log file is rotated.
What I mean is that when an hour has passed the current logfile.log is renamed to logfile.log.[date with time]log and a new logfile.log is created.
So for example:
log4j.appender.Appender2=org.apache.log4j.DailyRollingFileAppender
log4j.appender.Appender2.File=app.log
log4j.appender.Appender2.DatePattern='.'yyyy-MM-dd-HH
My sources in file.json are linked to specific files ex:
"inputs": [ { "source": "example", "stream": "example_stream", "config": { "path": "/logs/logfile.log" } },
I have changed the debug = "true" on the server so that I could observe all of the messages send and it seems that after a while only messages from sources that have constant name (with no log rotator) are left.
This is just my observation, maybe you could take a look if I got the problem right.
Furthermore is there any way to see the logs from io-file-input?
The text was updated successfully, but these errors were encountered: