uwsgi部署web项目时的问题

来源:互联网 发布:java中平方怎么表示 编辑:程序博客网 时间:2024/05/19 02:24

在LINUX下部署Nginx、uwsgi、django时,出现问题:

1.找不到项目:

django.core.exceptions.ImproperlyConfigured: Error loading cx_Oracle module: libclntsh.so.11.1: cannot open shared object file: No such file or directory
unable to load app 0 (mountpoint='') (callable not found or import error

在安装cx_Oracle的前提下,找不到这个包。

解决办法:

$ echo /oracle/product/11.1.0/db_1/**lib > /etc/ld.so.conf.d/oracle.conf
$ ldconfig

在root用户下运行上面两个命令,就ok了,/oracle/product/11.1.0/db_1/**lib这个路径根据自己情况更改

2.uwsgi启动太多次:

your processes number limit is 16384
your memory page size is 4096 bytes
detected max file descriptor number: 65536
lock engine: pthread robust mutexes
thunder lock: disabled (you can enable it with --thunder-lock)
probably another instance of uWSGI is running on the same address (:8080).
bind(): Address already in use [core/socket.c line 769]


可以用命令杀掉这个端口在重启:

sudo fuser -k 8080/tcp


原创粉丝点击