pieceofsummer / Hangfire.Console

Job console extension for Hangfire
MIT License
436 stars 80 forks source link

Does anyone suffers from server restarts when larger amount of logs is pushed into Console? #124

Open krzysiek-b opened 1 year ago

krzysiek-b commented 1 year ago

Hi,

recently I found that pushing larger amount of logs (>1MB) into console within 30-40 sec forces Hangfire server to restart. Did anyone observed similar issue?

IIS memory limits are disabled

lucasorth commented 1 year ago

Hi,

Yes, I've experienced with this same problem too, or something like that. I have a load process that calls external API and runs for a long period, and eventually logs warns with Hangfire.Console (v1.4.2). After like a hour of operation (~40 - 50 lines in console), the worker restart in another thread, and aparently the old thread was running out of dashboard control, cause I began to detect duplicate API requests to the resources, forcing me to restart job.

When I disabled the logs to console, justing commenting all lines that calls WriteLine() on injected PerformContext instance, this problem just disappeared.

@krzysiek-b you found some solution to your problem?

Thanks.

krzysiek-b commented 1 year ago

Hi @lucasorth

I found the same thing. To many logs caused restarts. My solution was to limit the logs in the console but keep them all elsewhere. I did not managed to find the root cause.

middiu commented 10 months ago

I'm experiencing the same, I had to disable the console for now...

middiu commented 8 months ago

I noticed a new version of this library came out, maybe @pieceofsummer can have a look at this issue? at the moment I had to disable the console completely.

lucasorth commented 5 months ago

I didn't found the root cause yet, but apparently we are wrong about the log size or number of lines in console. In my tests, exactly each 30 minutes the server creates a new instance of the job, keeping the old one running, it not occurs if I disable the console lib.

This is a temp folder created when my job start image