Comments (10)
Specifically I believe the issue was that as Node worker threads exited they did not necessarily flush their file streams, thus when the number of open file streams exceeded ulimit
, the parent process crashed. I think.
from bree.
@alvin30595 I would suggest using the workerMessageHandler
and do the logging work on the main process. Worker threads and logging is pretty difficult.
from bree.
@r00b thank you so much!
from bree.
I've seen solutions ranging from installing watchman
to just setting the ulimit -n
to a higher int (although mine is already 10240) but I'm unsure if these are correct since they are machine-based solutions, and when my application runs in a different machine I don't want it to have the same problem.
from bree.
Not sure what the redis-service
contents are? But yes, it's common practice to even increase this on servers.
We do this on Forward Email out of the box with our ansible config:
from bree.
Turns out this was an issue regarding how winstonjs/winston-daily-rotate-file
works within worker threads. Spoiler alert, it doesn't work very well. Thanks for putting up with all of my non-issue issues.
from bree.
@robertsteilberg Think we may have hit the same issue but with bunyan - how did you resolve it? Was it purely not using logging in the worker thread or something else?
from bree.
@r00b would be really helpful if you could share some more details please
from bree.
Hi @ErisDS, apologies for late reply, I am on vacation this month. Unfortunately I found no way to resolve this without moving away from winstonjs/winston-daily-rotate-file
and avoiding a logging service that involves writing files to disk--this seems to be an issue with Node worker threads, not Bree, I think. It has been awhile since I was deep in this though. In the end I found that maintaining logs by writing to files was not the best option for me anyway, seems that using services to capture logs and keep them in a platform somewhere was a better option.
from bree.
if that the case, what logger you used to replace winston? Mind to share your alternative? Thanks
Hi @ErisDS, apologies for late reply, I am on vacation this month. Unfortunately I found no way to resolve this without moving away from
winstonjs/winston-daily-rotate-file
and avoiding a logging service that involves writing files to disk--this seems to be an issue with Node worker threads, not Bree, I think. It has been awhile since I was deep in this though. In the end I found that maintaining logs by writing to files was not the best option for me anyway, seems that using services to capture logs and keep them in a platform somewhere was a better option.
from bree.
Related Issues (20)
- [fix] defaultRootIndex is not working - also not a valid option
- [fix] Error when I tried to use dependencies into the job HOT 2
- [feat] function to list all runnning jobs HOT 1
- [fix] Error [ERR_UNSUPPORTED_ESM_URL_SCHEME] HOT 3
- [fix] Cron last day of the month incorrect behaviour
- [fix] script works in main thread but fails in worker thread with FATAL ERROR or silent crash HOT 2
- Bree applied to data ingest HOT 1
- [fix] Missing await on 'start' function.
- [feat] Please Allow us to see what jobs are in the Que
- [fix] Types aren't making timeout and interval optional HOT 2
- cron job starts after timeout not after definition HOT 2
- [fix] Bree not working with Later HOT 1
- Bree Workers Won't Follow closeWorkerAfterMs rule
- Using, name + path + cron starts job on start HOT 1
- [fix] cannot extends types HOT 5
- Bree Job not able to resolve the dependencies
- TypeError: Bree is not a constructor HOT 3
- Job sometimes reports as "already running" when it isn't, and then runs anyway
- [fix] Bree doesn't gracefully exit HOT 4
- [feat] Need to be able to remove job after # of runs HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bree.