Python-Tls-Client icon indicating copy to clipboard operation
Python-Tls-Client copied to clipboard

No Respons or Dead Lock while sending request in sub-process

Open dusty-cjh opened this issue 2 years ago • 1 comments
trafficstars

Env

MacOS M1 chip Python3.9, using the tls-client.dylib

Phenomenon

  1. When I call the dylib.request method in single main process, everything works well.
  2. But when I call the dylib.request in the sub-process created by Celery, the request call never return value. it just blocked forever.

Question

here is the original question link

I want to know how I could inspect deeper for this problem, since I just use the PyCharm Debugger, but which get stucked in the function entry point. I got no idea what the next step I should do.

Could you give me some advices ? Thanks a lot

dusty-cjh avatar Feb 12 '23 17:02 dusty-cjh

If anyone encounters a similar problem. for the correct operation of the tls-client library, you need to start the celery queue with the -P threads parameter

for example celery -A ProjName worker -l INFO -P threads

darphiz avatar Jun 01 '23 18:06 darphiz