去掉Nginx的一个警告 1

Posted by Linuxtty on 三月 27, 2010

自己机器上装的是Nginx,每次开机启动nginx的时候总会弹个警告出来:

[warn]: 8192 worker_connections are more than open file resource limit: 1024

曾google过一个方法,照着弄也没成功,就一直放着没理了。

今晚看GReader,突然看到篇文章,想着触类旁通,就手动试试了。

sudo vim /etc/init.d/nginx

在启动脚本开头加上:

ulimit -n 65535

重新启动nginx,警告消失了:P

顺带想起某人说过的:“这叫workaround,不是solution”

Trackbacks

Use this link to trackback from your own site.

Comments

Leave a response

  1. fly2never Mozilla Firefox Windows 周日, 15 八 2010 10:57:23 UTC

    workaround?

    [回复]

Comments