You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have several small servers with 1gb ram, currently the queues are processed evenly, but the amount of memory used by each queue is constant but variable over time, there are times when 1 single server has 90% of the memory occupied, while the rest is 40 or 50%, because the queues are processed equally, I read the documentation and I can't find a place where I can set the limit of memory / disk / cpu usage or by x condition, for this I first thought of a simple setInterval , to check memory, disk, cpu or whatever variable you need every X minutes and pause the queues and/or resume when the amount is valid.
It works for me, I feel that something is missing, then try to create middlewares based on express (I tried based on koa, but it seems that it would need a little more work)
Currently both solutions work well for me, I lean more towards the middleware solution, because it could be scaled/improved for different types of solutions, such as sessions or rate limiter, which is not the goal of bull, but it would be a good complement.
I would like to know if this topic has been discussed, because I did not find anything in the issues, I would love this feature.
This discussion was converted from issue #2434 on September 28, 2022 07:54.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Description
I have several small servers with 1gb ram, currently the queues are processed evenly, but the amount of memory used by each queue is constant but variable over time, there are times when 1 single server has 90% of the memory occupied, while the rest is 40 or 50%, because the queues are processed equally, I read the documentation and I can't find a place where I can set the limit of memory / disk / cpu usage or by x condition, for this I first thought of a simple setInterval , to check memory, disk, cpu or whatever variable you need every X minutes and pause the queues and/or resume when the amount is valid.
It works for me, I feel that something is missing, then try to create middlewares based on express (I tried based on koa, but it seems that it would need a little more work)
Currently both solutions work well for me, I lean more towards the middleware solution, because it could be scaled/improved for different types of solutions, such as sessions or rate limiter, which is not the goal of bull, but it would be a good complement.
I would like to know if this topic has been discussed, because I did not find anything in the issues, I would love this feature.
Beta Was this translation helpful? Give feedback.
All reactions