现象: PHP查询数据库较慢,大约 60s 后 nginx 返回 504:Sorry, the page you are looking for is currently unavailable. 检查log: 从 /etc/nginx/nginx.conf 找到 /var/log/nginx/access.log 和 /var/log/nginx/error.log log 显示 upstream timed out (110: Connection timed out) while read…
(1)报错情况如下: DoesNotExist: Publisher matching query does not exist. (2)处理方法: try: p = Publisher.objects.get(name='Apress')except Publisher.DoesNotExist: print "Apress isn't in the database yet."else: print "Apress is in the databas…
错误信息如下: 解决方案是: 找到自己的项目文件夹下的__init__.py 添加如下代码 解决这个问题后,右报错django2.2/mysql ImproperlyConfigured: mysqlclient 1.3.13 or newer is required; you have 0.9.3 解决方案参看如下博客 https://blog.csdn.net/weixin_33127753/article/details/89100552…