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.

multiprocessing pool hangs on join

See original GitHub issue

I’m trying to run some python code in parallel. Once I received a message , I would use multiprocessing.Pool and ‘apply_async’ to process this message. A moment later, I found multiprocessing pool hangs on join and no messages consumed. With ps -ppid=${pid} command, I found this:

  PID TTY          TIME CMD
  312 pts/42   00:00:05 ConsumeTP
  313 pts/42   00:00:05 ConsumeTP
  314 pts/42   00:00:07 ConsumeTP
  315 pts/42   00:00:00 ConsumeTP
  317 pts/42   00:00:05 ConsumeTP
44417 pts/42   00:00:01 ConsumeTP
44418 pts/42   00:00:02 ConsumeTP
44419 pts/42   00:00:00 ConsumeTP
44425 pts/42   00:00:01 ConsumeTP
44426 pts/42   00:00:00 ConsumeTP

These processes just in there without running. I don’t know if this is the reason why the process hangs and can’t consume message.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Sultan91commented, Jul 24, 2020

Maybe you will share the secret?

0reactions
2h4dlcommented, Dec 30, 2019

I solved it and this issue has nothing to do with rocketmq. Close it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Python multiprocessing pool hangs at join? - Stack Overflow
My issue is that the code seems to hang and never exit. A few of the files fail with an exception, but i...
Read more >
Why your multiprocessing Pool is stuck (it's full of sharks!)
On Linux, the default configuration of Python's multiprocessing library can lead to deadlocks and brokenness. Learn why, and how to fix it.
Read more >
Handling Hang in Python Multiprocessing - Sefik Ilkin Serengil
I was using multiprocessing.pool module and call its starmap method. Starmap lets you to pass multiple items whereas regular map does not.
Read more >
Programs using `multiprocessing` hang (deadlock) and never ...
For small amounts of data, the main process can join() all the spawned subprocesses and then pick up the data. This often works...
Read more >
Multiprocessing Pool Wait For All Tasks To Finish in Python
We can then call the join() function. This will block the caller until all tasks in the process pools are completed and the...
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