django项目达到的最大递归级别

时间:2018-06-01 13:28:37

标签: python

浏览器响应

Request Method:     GET
Request URL:    http://192.168.1.25/bigflow/Getprstatus/
Django Version:     2.0.3
Exception Type:     OverflowError
Exception Value:    

 Maximum recursion level reached

 Exception Location:    /usr/local/lib/python3.5/dist-packages/pandas      /io/json/json.py in write, line 99
Python Executable:  /var/www/bigb/venv/bin/python
Python Version:     3.5.2

Apache2托管文件

Alias /static /var/www/bigb/Bigflow/Bigflow/static
Alias /staticdemo /var/www/bigb/BigflowDemo/Bigflow/Bigflow/static

<Directory /var/www/bigb/Bigflow/Bigflow/static>
    Require all granted
</Directory>

<Directory /var/www/bigb/BigflowDemo/Bigflow/Bigflow/static>
    Require all granted
</Directory>



WSGIDaemonProcess bigflow processes=2 threads=15 display-name=%{GROUP} python-home=/var/www/bigb/venv
WSGIProcessGroup bigflow
WSGIScriptAlias /bigflow /var/www/bigb/Bigflow/Bigflow/wsgi.py

WSGIDaemonProcess Bigflow_api processes=2 threads=15 display-name=%{GROUP} python-home=/var/www/bigb/venv
WSGIProcessGroup Bigflow_api
WSGIScriptAlias /Bigflow_api /var/www/bigb/Bigflow_api/Bigflow_api/wsgi.py

WSGIDaemonProcess bigflowdemo processes=2 threads=15 display-name=%{GROUP} python-home=/var/www/bigb/venv
WSGIProcessGroup bigflowdemo
WSGIScriptAlias /bigflowdemo /var/www/bigb/BigflowDemo/Bigflow/Bigflow/wsgi.py

<Directory /var/www/bigb/Bigflow>
    Options -Indexes
</Directory>
<Directory /var/www/bigb/BigflowDemo/Bigflow>
    Options -Indexes
</Directory>
<Directory /var/www/bigb/Bigflow/Bigflow>
    <Files wsgi.py>
        Require all granted
    </Files>
</Directory>

<Directory /var/www/bigb/Bigflow_api/Bigflow_api>
    <Files wsgi.py>
        Require all granted
    </Files>
</Directory>

<Directory /var/www/bigb/BigflowDemo/Bigflow/Bigflow>
    <Files wsgi.py>
        Require all granted
    </Files>
</Directory>

我正在使用django项目,最近我在apache2服务器上托管了一个新的应用程序,现在apache2正在运行两个应用程序,这两个django项目都运行正常。但经常我得到一些错误,如“达到最大递归级别”,我的应用程序无法正常工作。请帮我找到问题。

将应用程序指向同一虚拟环境(venv)是否正确

1 个答案:

答案 0 :(得分:1)

在我发现这个快速而肮脏的解决方案只是增加python脚本中的递归限制后,我遇到了同样的问题:

sys.setrecursionlimit(1500)

默认值为951,如果它不起作用,那么我猜你需要查看重复模式的追溯

我希望对某人有所帮助!