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.

RuntimeError: can't start new thread

See original GitHub issue

Everything was working fine on the previous build, now that I have upgraded I am receiving this error - Traceback (most recent call last): File "sherlock.py", line 649, in <module> main() File "sherlock.py", line 613, in main timeout=args.timeout) File "sherlock.py", line 255, in sherlock timeout=timeout File "/usr/local/lib/python3.7/dist-packages/requests_futures/sessions.py", line 138, in head return super(FuturesSession, self).head(url, **kwargs) File "/usr/local/lib/python3.7/dist-packages/requests/sessions.py", line 568, in head return self.request('HEAD', url, **kwargs) File "sherlock.py", line 59, in request return super(ElapsedFuturesSession, self).request(method, url, hooks=hooks, *args, **kwargs) File "/usr/local/lib/python3.7/dist-packages/requests_futures/sessions.py", line 105, in request return self.executor.submit(func, *args, **kwargs) File "/usr/lib/python3.7/concurrent/futures/thread.py", line 160, in submit self._adjust_thread_count() File "/usr/lib/python3.7/concurrent/futures/thread.py", line 181, in _adjust_thread_count t.start() File "/usr/lib/python3.7/threading.py", line 847, in start _start_new_thread(self._bootstrap, ()) RuntimeError: can't start new thread

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:8 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
0xAL3INOcommented, Dec 25, 2019

Can you try it now with the latest content on master (version 0.10.0)? In #471, I placed a limit on the number of threads that can be allocated. And, it did not seem to make any difference on performance.

It works great, thanks! I’m surprised it has no effect on performance - my pi can run a full scan in 45 seconds now, though I hadn’t timed it previously.

0reactions
hoadlckcommented, Dec 25, 2019

It is a Christmas miracle! 😃

Well…actually, I guess it is not that surprising. Trying to spawn so many threads ends up using too many resources. Which can end up causing a given thread to be even slower than normal. On my Windows 10 PC, there were some sites that did not detect usernames under the old version: Sherlock found more sites with a harder limit of threads.

Unfortunately, the tests invoke Sherlock with a limited number of sites multiple times. So, an individual test never spawned so many threads at one time…they were spread out over multiple invocations to cover the entire list. While it was fine for functionality, it missed this case.

Read more comments on GitHub >

github_iconTop Results From Across the Web

python - error: can't start new thread
The "can't start new thread" error almost certainly due to the fact that you have already have too many threads running within your...
Read more >
RuntimeError: can't start new thread
I'm running into an issue where running multiple instances of the same Python program on my server is causing some of the jobs...
Read more >
RuntimeError: can't start new thread : Forums
RuntimeError : can't start new thread. I am trying to run a montecarlo simulation on the web app. I am using a package...
Read more >
question
9: RuntimeError: can't start new thread Stack: File "/azure-functions-host/workers/python/3.9/LINUX/X64/azure_functions_worker/dispatcher.py",.
Read more >
RuntimeError: can't start new thread (0.23.2) #311
Long story short operator pod gets killed due to hitting thread limit reached as process keeps on spawning new threads and in loads ......
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