我遇到了与这篇文章Django+gunicorn+nginx upload large file 502 error完全相同的问题。但提供的解决方案对我来说不起作用,也许是因为它相当旧。
我正在使用 django、gunicorn、supervisor 和 nginx 以及 python 3.6,我已经根据gunicorn的文档安装了 gevent,我的gunicorn配置如下所示:
[program:gunicorn]
directory=/home/ubuntu/mysite
command=/home/ubuntu/env/bin/gunicorn --workers 3 --worker-class gevent --worker-connections=1000 --timeout 600 --bind unix:/home/ubuntu/mysite/app.sock app.wsgi:application
autostart=true
autorestart=true
stderr_logfile=/var/log/gunicorn/gunicorn.err.log
stdout_logfile=/var/log/gunicorn/gunicorn.out.log
[group:guni]
programs:gunicorn
Run Code Online (Sandbox Code Playgroud)
在gunicorn日志中,我收到错误:
File "/home/ubuntu/exo/lib/python3.6/site-packages/gunicorn/workers/ggevent.py", line 16, in <module>
raise RuntimeError("gevent worker requires gevent 1.4 or higher")
RuntimeError: gevent worker requires gevent 1.4 or higher
[2020-05-16 13:22:40 +0000] [24451] [DEBUG] Current configuration:
config: None
bind: ['unix:/home/ubuntu/myapp/app.sock']
backlog: 2048
workers: 4
worker_class: sync
threads: 12
worker_connections: 1000
max_requests: 0 …Run Code Online (Sandbox Code Playgroud) 我一整天都在尝试删除图表 js 中雷达图的比例。尽管图表工作得很好,但似乎没有任何方法可以消除比例。不幸的是,该文档对这个问题没有太大帮助。图表如下所示。秤每次看起来都一样。从浏览器中清除缓存也没有帮助。
这是图表的代码:
function setChart(){
var ctx = document.getElementById('myChart').getContext('2d');
var myChart = new Chart(ctx, {
type: 'radar',
data: {
labels: ['classA','classB','classC','classD'],
datasets: [{
label: 'revenue proportion per class',
data: [0.25, 0.3, 0.15, 0.3],
backgroundColor: [
'rgba(255, 99, 132, 0.2)',
],
borderColor: ['rgba(255, 99, 132, 0.2)'],
borderWidth: 5
},
{
label: 'proportion of item quantity per class',
data: [0.25, 0.3, 0.15, 0.3],
backgroundColor: [
'rgba(54, 162, 235, 0.2)',
],
borderColor: ['rgba(54, 162, 235, 0.2)'],
borderWidth: 5
}
],
Run Code Online (Sandbox Code Playgroud)
和选项:
options: …Run Code Online (Sandbox Code Playgroud)