error: can't start new thread

前端 未结 8 1434
天涯浪人
天涯浪人 2020-12-01 12:31

I have a site that runs with follow configuration:

Django + mod-wsgi + apache

In one of user\'s request, I send another HTTP request to another service, and

8条回答
  •  余生分开走
    2020-12-01 12:41

    in my case, I added this code before starting a new thread. It gives the app a max limit of running threads will wait

    while threading.active_count()>150 :
        time.sleep(5)
    getting.start()
    

    Note: It is not a good solution but I had to find a workaround to solve that issue and this worked for me.

提交回复
热议问题