[GH-ISSUE #263] [QUESTION] Setting Concurrency does not work #99

Closed
opened 2026-03-02 05:18:39 +03:00 by kerem · 6 comments
Owner

Originally created by @gopkg-dev on GitHub (Apr 16, 2021).
Original GitHub issue: https://github.com/hibiken/asynq/issues/263

I set Concurrency = 200, and there are less than 10 at work, and my tasks are tens of thousands.

How can I fix it and make it all work.

@hibiken

Originally created by @gopkg-dev on GitHub (Apr 16, 2021). Original GitHub issue: https://github.com/hibiken/asynq/issues/263 I set Concurrency = 200, and there are less than 10 at work, and my tasks are tens of thousands. How can I fix it and make it all work. @hibiken
kerem closed this issue 2026-03-02 05:18:39 +03:00
Author
Owner

@gopkg-dev commented on GitHub (Apr 16, 2021):

image
image

<!-- gh-comment-id:821279639 --> @gopkg-dev commented on GitHub (Apr 16, 2021): ![image](https://user-images.githubusercontent.com/58848833/115052196-3e648400-9f10-11eb-962f-1c727fd25288.png) ![image](https://user-images.githubusercontent.com/58848833/115052245-4f14fa00-9f10-11eb-85c9-16b8ee3ffb05.png)
Author
Owner

@hibiken commented on GitHub (Apr 16, 2021):

@gopkg-dev thanks for opening this issue!

From the screenshot, it seems like your asynq.Server is not configured to consume tasks from your db_process queue.
(It seems like you didn't specify the Queue option for your server, which means it only reads from the default queue)

You can configure the server to consume task from db_process queue like this:

srv := asynq.NewServer(redisConnOpt, asynq.Config{
    Concurrency: 200,
    Queues: map[string]int{
        "db_process": 1,
    },
})

For more detail documentation on the Config, please refer to the godoc.

Let me know if you are still seeing the issue!

<!-- gh-comment-id:821526844 --> @hibiken commented on GitHub (Apr 16, 2021): @gopkg-dev thanks for opening this issue! From the screenshot, it seems like your `asynq.Server` is not configured to consume tasks from your **db_process** queue. (It seems like you didn't specify the `Queue` option for your server, which means it only reads from the default queue) You can configure the server to consume task from **db_process** queue like this: ```go srv := asynq.NewServer(redisConnOpt, asynq.Config{ Concurrency: 200, Queues: map[string]int{ "db_process": 1, }, }) ``` For more detail documentation on the Config, please refer to the [godoc](https://pkg.go.dev/github.com/hibiken/asynq#Config). Let me know if you are still seeing the issue!
Author
Owner

@hibiken commented on GitHub (Apr 21, 2021):

@gopkg-dev Did it solve the issue?

<!-- gh-comment-id:824056478 --> @hibiken commented on GitHub (Apr 21, 2021): @gopkg-dev Did it solve the issue?
Author
Owner

@gopkg-dev commented on GitHub (Apr 21, 2021):

Thanks for your reply, it has been solved, the reason is that the performance of redis running in docker is limited.

<!-- gh-comment-id:824110146 --> @gopkg-dev commented on GitHub (Apr 21, 2021): Thanks for your reply, it has been solved, the reason is that the performance of redis running in docker is limited.
Author
Owner

@abdeljalil09 commented on GitHub (Jan 11, 2024):

hello @hibiken thanks for this great library
i have the same issue i set it to 1000 and i only see no more than 10 active workers in asynqmon

i push tasks to the queue with a goroutine when it's finished , i then run another goroutine with

image

<!-- gh-comment-id:1888121525 --> @abdeljalil09 commented on GitHub (Jan 11, 2024): hello @hibiken thanks for this great library i have the same issue i set it to 1000 and i only see no more than 10 active workers in asynqmon i push tasks to the queue with a goroutine when it's finished , i then run another goroutine with ![image](https://github.com/hibiken/asynq/assets/101262837/2ebe9d62-bef9-4971-9073-4adbad53196f)
Author
Owner

@abdeljalil09 commented on GitHub (Feb 27, 2024):

Hello can you help,

<!-- gh-comment-id:1967330295 --> @abdeljalil09 commented on GitHub (Feb 27, 2024): Hello can you help,
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/asynq#99
No description provided.