Apache stops processing requests (mod_wsgi?)

后端 未结 1 343
春和景丽
春和景丽 2021-01-28 22:09

At some point my site, running on Apache2 with mod_wsgi just stops processing requests. The connection to server is maintained and client waits for responce, b

1条回答
  •  礼貌的吻别
    2021-01-28 22:36

    Sounds like you are using embedded mode to run the multiple applications and you are using third party C extensions that have problems in sub interpreters, resulting in potential deadlock. Else your code is internally deadlocking or blocking on external services and never returning, causing exhaustion of available processes/threads.

    For a start, you should look at using daemon mode and delegate each web application to a distinct daemon process group and then forcing each to run in the main interpreter.

    See:

    http://code.google.com/p/modwsgi/wiki/QuickConfigurationGuide#Delegation_To_Daemon_Process http://code.google.com/p/modwsgi/wiki/ApplicationIssues#Python_Simplified_GIL_State_API

    Otherwise use debugging tips described in:

    http://code.google.com/p/modwsgi/wiki/DebuggingTechniques

    for getting stack traces about what application is doing.

    0 讨论(0)
提交回复
热议问题