Two Django projects running simultaneously and mod_wsgi acting werid

前端 未结 4 892
轻奢々
轻奢々 2020-12-09 12:21

I\'m trying to run two Django projects simultaneously. I happened to be using mod_wsgi, and found the site is acting weird. Perhaps there would be a workaround, but I\'d lik

4条回答
  •  臣服心动
    2020-12-09 12:48

    Use this as a workaround:

    WSGIDaemonProcess pydaemon-1 processes=1 threads=5
    WSGIDaemonProcess pydaemon-2 processes=1 threads=5
    
    WSGIScriptAlias /test /var/www/html/test/wsgi.py
    
    
    WSGIProcessGroup pydaemon-1
    WSGIApplicationGroup %{GLOBAL}
    
    
    WSGIScriptAlias /proto /var/www/html/proto/wsgi.py
    
    
    WSGIProcessGroup pydaemon-2
    WSGIApplicationGroup %{GLOBAL}
    
    

    This will force each application into separate daemon process group and no way they should be able to interfere with each other.

    If that still doesn't work, you have problems with your WSGI script file somehow.

提交回复
热议问题