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.

Dynamic thread pool exiting after maxInactiveTime for long running jobs

See original GitHub issue

I have a job running for more than one minute (it involves some API calls). The issue is that after one minute (default maxInactiveTime), the worker will close itself whether the job is running or not. I think the code should include a check for whether the job is running or not in function _checkAlive. Please share your thoughts on this.

As a workaround for now, I can either move to Fixed thread pool or use a high value for maxInactiveTime.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:14 (11 by maintainers)

github_iconTop GitHub Comments

2reactions
jithinskcommented, Jan 27, 2021

Thanks for the quick reply, I need a quick solution, so I will go with high value for maxInactiveTime for now. I will surely look into contributing in my free time.

1reaction
pioardicommented, Feb 24, 2021

@jithinsk FYI we released a 2.0.0.beta version that you can now use. We will release the 2.0.0 stable version around next week. Enjoy 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Dynamic resizing of java.util.concurrent.ThreadPoolExecutor ...
If you are trimming the pool size, the remaining threads will shut-down once their current job queue is completed (if they are idle, ......
Read more >
Introduction to Thread Pools in Java - Baeldung
Quick and practical guide to different ThreadPool implementations in Java and Guava.
Read more >
poolifier/poolifier: Fast and small Node.js thread pool ... - GitHub
maxInactiveTime - Max time to wait tasks to work on (in ms), after this period the new worker will die. The last active...
Read more >
Finally Getting the Most out of the Java Thread Pool - Stackify
Essentially, threads are kept in the thread pool until they're needed, after which they execute the task and return the pool to be...
Read more >
ThreadPoolExecutor in Python: The Complete Guide
If we forget to close the pool and there are still tasks executing, the main thread will not exit until all tasks in...
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