VPS侦探论坛

 找回密码
 注册
查看: 27472|回复: 11

求助一个nginx错误 [emerg] zero size shared memory zone "one"

[复制链接]
发表于 2012-9-6 15:51:51 | 显示全部楼层 |阅读模式

[root@localhost vhost]# /usr/local/nginx/sbin/nginx -t
nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
nginx: [emerg] zero size shared memory zone "one"
nginx: configuration file /usr/local/nginx/conf/nginx.conf test failed

配置文件提示错误 但是这个要如何修改才可以呢
之前一直用着好好的,但是今天加了2个站点发现都不显示图片和css 然后就重启了下服务器,结果nginx就起不来了。提示这个错误
服务器是4g内存,不应该会是内存不够导致的。

求高手帮助 谢谢你们了
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2012-9-6 15:58:58 | 显示全部楼层


已经用./upgrade_nginx.sh升级过版本(重装nginx过)
但是依然不行,应该是配置问题,请问哪里出错了?
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2012-9-6 16:01:53 | 显示全部楼层

还忘记说一点
今天绑站点的时候绑重复了一个,但是我后来修改了。。
不知道和这个有关系么
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2012-9-6 16:40:05 | 显示全部楼层



2012/09/06 10:35:10 [warn] 18364#0: conflicting server name "www.xxx.net" on 0.0.0.0:80, ignored
2012/09/06 10:35:10 [emerg] 18364#0: zero size shared memory zone "one"
2012/09/06 10:35:10 [warn] 18366#0: conflicting server name "www.xxx.net" on 0.0.0.0:80, ignored
2012/09/06 10:35:10 [notice] 18366#0: signal process started
2012/09/06 10:59:37 [notice] 28571#0: signal process started
2012/09/06 11:01:23 [notice] 29288#0: signal process started
2012/09/06 11:04:20 [notice] 30550#0: signal process started
2012/09/06 11:06:09 [emerg] 31219#0: zero size shared memory zone "one"
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
发表于 2012-9-6 16:52:41 | 显示全部楼层

设置了limit_zone?
可能是这个的问题,你吧你这个地方的设置发上来看看

军哥运维代购:http://shop63846532.taobao.com/

 楼主| 发表于 2012-9-6 16:54:07 | 显示全部楼层

  1. user  www www;

  2. worker_processes 1;

  3. error_log  /home/wwwlogs/nginx_error.log  crit;

  4. pid        /usr/local/nginx/logs/nginx.pid;

  5. #Specifies the value for maximum file descriptors that can be opened by this process.
  6. worker_rlimit_nofile 51200;

  7. events

  8. {

  9. use epoll;

  10. worker_connections 51200;

  11. }

  12. http

  13. {

  14. include       mime.types;

  15. default_type  application/octet-stream;


  16. server_names_hash_bucket_size 128;

  17. client_header_buffer_size 32k;

  18. large_client_header_buffers 4 32k;

  19. client_max_body_size 50m;
  20.     limit_zone one $binary_remote_addr 32k;


  21. sendfile on;

  22. tcp_nopush     on;


  23. keepalive_timeout 60;


  24. tcp_nodelay on;


  25. fastcgi_connect_timeout 300;

  26. fastcgi_send_timeout 300;

  27. fastcgi_read_timeout 300;

  28. fastcgi_buffer_size 64k;

  29. fastcgi_buffers 4 64k;

  30. fastcgi_busy_buffers_size 128k;

  31. fastcgi_temp_file_write_size 256k;


  32. gzip on;

  33. gzip_min_length  1k;

  34. gzip_buffers     4 16k;

  35. gzip_http_version 1.0;

  36. gzip_comp_level 2;

  37. gzip_types       text/plain application/x-javascript text/css application/xml;

  38. gzip_vary on;


  39. #limit_zone  crawler  $binary_remote_addr  10m;


  40. #log format

  41. log_format  access  '$remote_addr - $remote_user [$time_local] "$request" '
  42.              '$status $body_bytes_sent "$http_referer" '
  43.              '"$http_user_agent" $http_x_forwarded_for';

  44. server

  45. {

  46. listen       80;

  47. server_name test.xxx.net;

  48. index index.html index.htm index.php;

  49. root  /home/wwwroot;


  50. location / {

  51. try_files $uri @apache;

  52. }


  53. location @apache {

  54. internal;

  55. proxy_pass http://127.0.0.1:88;

  56. include proxy.conf;

  57. }


  58. location ~ .*\.(php|php5)?$

  59. {

  60. proxy_pass http://127.0.0.1:88;

  61. include proxy.conf;

  62. }


  63. location /status {

  64. stub_status on;

  65. access_log   off;

  66. }


  67. location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$

  68. {

  69. expires      30d;

  70. }


  71. location ~ .*\.(js|css)?$

  72. {

  73. expires      12h;

  74. }


  75. access_log  /home/wwwlogs/access.log  access;

  76. }
  77. include vhost/*.conf;
  78. }
复制代码
 楼主| 发表于 2012-9-6 16:54:50 | 显示全部楼层

军哥,貌似我没有修改过 的
刚才执行了一下 ./apache.sh 问题依旧。。

[ 本帖最后由 pop68315 于 2012-9-6 16:56 编辑 ]
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2012-9-6 17:24:13 | 显示全部楼层

回复 7# 的帖子


你发升级到lnmpa后的就没啥用处了
应该有个limit_zone one,把后面的值调大应该就行了
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2012-9-6 17:25:34 | 显示全部楼层


原帖由 licess 于 2012-9-6 17:24 发表
你发升级到lnmpa后的就没啥用处了
应该有个limit_zone one,把后面的值调大应该就行了

我发的日志是升级前的,发了后 操作过一次。lnmpa,对了 我一直是在用lnmpa的。。只是想升级下看看能修复么

老大您能把limit_zone one 详细参数发出来吗?谢谢老大!
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2012-9-6 18:00:37 | 显示全部楼层



这个参数应该是你自己加的,lnmp默认没这个
 楼主| 发表于 2012-9-6 18:25:49 | 显示全部楼层

原帖由 licess 于 2012-9-6 18:00 发表
这个参数应该是你自己加的,lnmp默认没这个


军哥我没有修改过这个配置,然后我一直用的就是lnmpa没有用lnmp
升级lnmpa是为了重装下 看看是否可以修复错误
 楼主| 发表于 2012-9-6 22:57:03 | 显示全部楼层

最后还是重装解决的了。
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-9-23 19:29 , Processed in 0.029067 second(s), 17 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表