在使用django开发的时候,访问网站出现了502错误,次数也比较平繁 uwsgi+nginx+django 在命令行下提示如下错误 : File "/opt/apps/python3/lib/python3.5/linecache.py", line 137, in updatecache lines = fp.readlines() File "/opt/apps/python3/lib/python3.5/codecs.py", line 321, in de…
一.UTF-8编码文件读取导致的错误 有个txt文件,里面内容为: aaa bbb ccc 以UTF-8编码方式打开txt文件,顺序读取,将里面的值放到一个hashset中,并判断aaa是否在在hashset中 class { public static void main(String[] args) { try { HashSet<String> specialCateSet= new HashSet<String>(); FileInputStream a = new Fil…
502错误基本就是php进程执行中挂了,其中有个原因就可能是进程执行超时设置导致的比如这个: ; The timeout for serving a single request after which the worker process will; be killed. This option should be used when the 'max_execution_time' ini option; does not stop script execution for some rea…
之前遇到的问题: 安装好之后访问域名出现502错误,打开html文件正常,说明是php出现问题.在wwwlog文件夹查看nginx日志,发现报错原因是找不到/var/run/php5-fpm.sock.具体:connect() to unix:/var/run/php5-fpm.sock failed (2: No such file or directory) 解决方法:/var/run/php5-fpm.sock这个文件负责中转nigin和phpfpm的数据,是两个软件对接的桥梁.在phpf…