简体   繁体   English

Django项目中达到的最大递归级别

[英]Maximum recursion level reached in django project

Browser Response 浏览器回应

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 Hosted File 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>

I'm working with django project, Recently i have hosted a new application in the apache2 server ,now apache2 is running with two application , both the django project are working fine. 我正在使用django项目,最近我在apache2服务器中托管了一个新应用程序,现在apache2正在运行两个应用程序,两个django项目都运行良好。 But frequently i get some error like "Maximum recursion level reached" and my application fails to work. 但是我经常遇到诸如“达到最大递归级别”之类的错误,并且我的应用程序无法正常工作。 please help me to find the problem. 请帮助我发现问题。

Is this correct to point both the application towards same virtual environment(venv) 将两个应用程序都指向相同的虚拟环境是否正确?

I had the same issue after i found this quick and dirty solution just increase the recursion limit in your python script: 我发现这个快速又肮脏的解决方案只是增加了python脚本中的递归限制后,我遇到了同样的问题:

sys.setrecursionlimit(1500)

Default is 951, if it's not working then i guess you need to look at the traceback for repetitive patterns 默认值为951,如果它不起作用,那么我想您需要查看重复模式的回溯

I hope it will be helpful to someone! 希望对您有所帮助!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM