question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Concurrency causing failure with connection limit

See original GitHub issue

Regarding https://github.com/jbielick/faktory_worker_node/blob/1ae4482529fb70dc276be68d39ce10f2ea44cc31/lib/worker.js#L59

Is there a reason the poolSize for the client is set to concurrency + 2? We have concurrency set to 100 and have many queues open and this is causing Faktory to essentially grind to a halt to the point where using the Web UI does not work. We also use Elixir and the concurrency there is not a problem.

Unless each Redis connection is blocking while the job is running, this seems like overkill.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:13 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
emhagmancommented, Nov 7, 2019

Thanks @jbielick. Since the max time for FETCH when no job exists is 2 seconds and the aquire timeout is 5 seconds, this should not be too much of an issue as long as I keep it around concurrency * 0.5. Appreciate the change!

1reaction
mperhamcommented, Nov 7, 2019

Sidekiq <4 used a single fetch thread which made it very sensitive to Redis network latency. Sidekiq 4+ uses $CONCURRENCY fetchers (each worker thread fetches from Redis directly) to minimize latency. Sidekiq Pro’s super_fetch uses 2 threads for $REASONS.

On Thu, Nov 7, 2019 at 11:23 AM Josh Bielick notifications@github.com wrote:

I thought I was copying the one fetch per processor concept from the sidekiq source, is that not how it works? Any other best practices in worker library design?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/jbielick/faktory_worker_node/issues/37?email_source=notifications&email_token=AAAAWX4O3ZZZQB3BLSLON6TQSRTKDA5CNFSM4JJXUJQKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEDNQUJY#issuecomment-551225895, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAAWX7BUM33KSAI5W52JADQSRTKDANCNFSM4JJXUJQA .

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I prevent MySQL concurrent connection limit issues?
Discover how to prevent concurrent connection limit issues for your Managed WordPress site's MySQL database. Including how to remove comment spam, ...
Read more >
Error - You have exceeded the concurrent connection limit ...
Problem Cause​​ There is a limit on the number of concurrent sessions a server can have or a user can launch. If applications...
Read more >
the k8s client hits some concurrent connections limit and it ...
my feeling is that the ClientConn reports that it can handle more connections, but when the caller actually calls the RoundTrip it fails...
Read more >
Connection concurrency limit exceeded - Plesk Support
Cause. The maximum number of connections that an SMTP client may make simultaneously is exceeded (default is 50). Resolution. Either of the following ......
Read more >
Suddenly an error - Server response: Concurrency limit ...
My app worked fine for weeks, suddenly this morning all users get the same error on start-up. Opening up in studio, this is...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found