Skip to content

High number of daily commands in a low use enviromment #2976

Answered by manast
chooban asked this question in Q&A
Discussion options

You must be logged in to vote

As far as I know, Upstash is now not charging for commands run inside BullMQ's scripts, only charging for 1 call per EVAL call. However, in this case I think the issue is with the "drainDelay" setting. This setting specifies the duration of the blocking commands in BullMQ, by default 5 seconds, that means that at least one command every 5 seconds will be issued. You can increase this value much more and everything would be fine and cheaper. Try with at least 60 seconds, and increase as you see fit.
https://api.docs.bullmq.io/interfaces/v5.WorkerOptions.html#drainDelay

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@chooban
Comment options

Answer selected by chooban
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants