使用 uWSGI 报错

错误信息

  1. [uWSGI] getting INI configuration from ./uwsgi.ini
  2. [uwsgi-static] added mapping for /noway => /usr/local/lib/python3.6/site-packages/drf_yasg/static/
  3. *** Starting uWSGI 2.0.19.1 (64bit) on [Wed Jan 19 03:44:50 2022] ***
  4. compiled with version: 10.2.1 20210110 on 19 January 2022 03:42:01
  5. os: Linux-4.19.91-23.al7.x86_64 #1 SMP Tue Mar 23 18:02:34 CST 2021
  6. nodename: noway-5b4df76965-dvb5k
  7. machine: x86_64
  8. clock source: unix
  9. pcre jit disabled
  10. detected number of CPU cores: 4
  11. current working directory: /root
  12. detected binary path: /usr/local/bin/uwsgi
  13. uWSGI running as root, you can use --uid/--gid/--chroot options
  14. *** WARNING: you are running uWSGI as root !!! (use the --uid flag) ***
  15. chdir() to /opt/noway/
  16. chdir(): No such file or directory [core/uwsgi.c line 2625]
  17. chdir(): No such file or directory [core/uwsgi.c line 1649]

uwsgi.ini 文件

  1. [uwsgi]
  2. http=:8000
  3. chdir=/opt/noway/
  4. module=noway.wsgi
  5. wsgi-file = /opt/noway/wsgi.py
  6. vacuum=True
  7. master=True
  8. workers=8
  9. enable-threads=True
  10. threads=32
  11. memory-report=True
  12. static-map=/noway=/usr/local/lib/python3.6/site-packages/drf_yasg/static/