多进程后续疑问

来源:16-2 nginx + uwsgi 实现多进程访问

SuperMan_GYD

2020-03-30

已经多进程可以了的情况下,如果修改代码会影响运行吗,需要重新运行部署吗

写回答

3回答

编程浪子

2020-03-31

你好

不需要,代码更新之后 重启就行了

uwsgi --reload  对应启动的pid文件


0
2
SuperMan_GYD
重启是重启了,,,问题出来了啊老师,,,突然直接我登录都不行了。。。 sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) no such table: user [SQL: SELECT user.uid AS user_uid, user.nickname AS user_nickname, user.mobile AS user_mobile, user.email AS user_email, user.sex AS user_sex, user.avatar AS user_avatar, user.login_name AS user_login_name, user.login_pwd AS user_login_pwd, user.login_salt AS user_login_salt, user.status AS user_status, user.updated_time AS user_updated_time, user.created_time AS user_created_time FROM user WHERE user.login_name = ? LIMIT ? OFFSET ?] [parameters: ('GYDNB', 1, 0)] (Background on this error at: http://sqlalche.me/e/e3q8) [pid: 23951|app: 0|req: 4/4] 223.152.1.207 () {48 vars in 915 bytes} [Fri Apr 3 22:39:14 2020] POST /user/login => generated 290 bytes in 22 msecs (HTTP/1.1 500) 2 headers in 99 bytes (1 switches on core 0) File "./web/controllers/user/User.py", line 43, in login user_info=User.query.filter_by(login_name=login_name).first()
2020-04-03
共2条回复

编程浪子

2020-04-04

你好

好了

1:杀死 uwsgi 进程,为什么要杀死?猜测应该是有一次启动没有加环境变量导致永远读不到了
2:export ops_config=production
3:uwsgi --ini uwsgi.ini


0
1
SuperMan_GYD
非常感谢老师在百忙之中帮我解决问题
2020-04-04
共1条回复

编程浪子

2020-04-03

你好

看到 sqlite这种关键字 肯定就是没有执行环境变量。必须要执行环境变量,不然无法记载数据库配置

linux

   export ops_config=production

windows

set ops_config=production

   


0
3
SuperMan_GYD
(python3_vir) [root@VM_0_7_centos Order]# cd ../logs (python3_vir) [root@VM_0_7_centos logs]# tail -f order.log File "/data/www/python3_vir/lib/python3.5/site-packages/sqlalchemy/engine/default.py", line 588, in do_execute cursor.execute(statement, parameters) sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) no such table: user [SQL: SELECT user.uid AS user_uid, user.nickname AS user_nickname, user.mobile AS user_mobile, user.email AS user_email, user.sex AS user_sex, user.avatar AS user_avatar, user.login_name AS user_login_name, user.login_pwd AS user_login_pwd, user.login_salt AS user_login_salt, user.status AS user_status, user.updated_time AS user_updated_time, user.created_time AS user_created_time FROM user WHERE user.login_name = ? LIMIT ? OFFSET ?] [parameters: ('GYDNB', 1, 0)] (Background on this error at: http://sqlalche.me/e/e3q8) [pid: 23951|app: 0|req: 14/16] 223.152.1.207 () {48 vars in 915 bytes} [Fri Apr 3 22:55:05 2020] POST /user/login => generated 290 bytes in 3 msecs (HTTP/1.1 500) 2 headers in 99 bytes (1 switches on core 0)
2020-04-03
共3条回复

Python Flask构建微信小程序订餐系统(可用于毕设)

微信小程序 + Python Flask 打造订餐系统全栈应用,可用于毕设。

1709 学习 · 1889 问题

查看课程