系统是centos6
加入开机命令后
nohup python server.py &

重启后老是错误

2015-05-30 01:22:15 WARNING [Errno 24] Too many open files
2015-05-30 01:22:15 INFO starting server at 0.0.0.0:53323
2015-05-30 01:22:15 WARNING [Errno 24] Too many open files
2015-05-30 01:22:15 INFO starting server at 0.0.0.0:53328
2015-05-30 01:22:15 WARNING [Errno 24] Too many open files
2015-05-30 01:22:15 INFO starting server at 0.0.0.0:53329
2015-05-30 01:22:15 WARNING [Errno 24] Too many open files
2015-05-30 01:22:30 WARNING db thread except:local variable 'sock' referenced before assignment
2015-05-30 01:22:45 WARNING db thread except:local variable 'sock' referenced before assignment
2015-05-30 01:23:00 WARNING db thread except:local variable 'sock' referenced before assignment
2015-05-30 01:23:15 WARNING db thread except:local variable 'sock' referenced before assignment
2015-05-30 01:23:30 WARNING db thread except:local variable 'sock' referenced before assignment

照着下面的方法改了没用啊
ulimit -SHn 65535

永久改变须打开
/etc/security/limits.conf
  * soft nproc 65536
  * hard nproc 65536
  * soft nofile 65536
  * hard nofile 65535
  * - sigpending 65536

加入一行
/etc/profile
ulimit -SHn 65535