cache manager process exited with fatal code 2 and cannot be respawned

Isaac Hailperin i.hailperin at heinlein-support.de
Fri Nov 9 13:15:07 UTC 2012


Refining my observations:

Its not an issue of version or OS ... that were wrong obersvations on my 
side.

But: Of the approx. 5000 vhost, there are about 1000 who do ssl, each on 
a different (high) port.

So without the ssl vhosts, I have about 1000 open files for nginx
(lsof |grep nginx|wc)
And nginx runs fine.

With the ssl vhosts, I have about 17000 open files. And I get the errors.

Does that ring a bell somewhere?
Also, 17000 is about 16 (amount of worker processes) * 1000 (num ssl 
hosts) + 1000 (nofiles without ssl).

I also wonder where the 512 worker_connections from the error message 
come from. There is no such number in my config. Is it hardcoded somewhere?

Isaac



On 11/08/2012 04:13 PM, Isaac Hailperin wrote:
>
>>
>> These message have no relation to eventfd().
>>
>> A process with pid of 23636 is probably cache loader. Both cache
>> manager and loader
>> do not use configured worker_connection number since they do not
>> process connections
>> at all.  However, they need one connection slot to communicate with
>> master process.
>>
>> 512 connections may be taken by listen directives if they use
>> different addreses,
>> or by resolvers if you defined a resolver in every virtual host.
>> A quick workaround is to define just a single resovler at http level.
> Hm, there were no resolvers defined in the virtual hosts. But I tried to
> add
> resolver 127.0.0.1;
> to my https section, but that did not help.
>
> Also, if resolvers would be the problem, it should also happen with
> other nginx builds, like the one I tested on opensuse, see my reply
> earlier today.
>
> Here is my config, including one vhost:
>
> user www-data;
> worker_processes 16;
> pid /var/run/nginx.pid;
> worker_rlimit_nofile 65000;
>
> events {
>          use epoll;
>          worker_connections 2000;
>          # multi_accept on;
> }
>
> http {
>
>          ##
>          # Basic Settings
>          ##
>
>          sendfile on;
>          tcp_nopush on;
>          tcp_nodelay on;
>          keepalive_timeout 65;
>          types_hash_max_size 2048;
>          # server_tokens off;
>
>          # server_names_hash_bucket_size 64;
>          # server_name_in_redirect off;
>
>          include /etc/nginx/mime.types;
>          default_type application/octet-stream;
>
>          ##
>          # Logging Settings
>          ##
>
>          access_log /var/log/nginx/access.log;
>          error_log /var/log/nginx/error.log debug;
>          #error_log /var/log/nginx/error.log;
>
>          ##
>          # Gzip Settings
>          ##
>
>          gzip on;
>          gzip_disable "msie6";
>
>          # gzip_vary on;
>          # gzip_proxied any;
>          # gzip_comp_level 6;
>          # gzip_buffers 16 8k;
>          # gzip_http_version 1.1;
>          # gzip_types text/plain text/css application/json
> application/x-javascript text/xml application/xml application/xml+rss
> text/javascript;
>       # Because we have a lot of server_names, we need to increase
>          # server_names_hash_bucket_size
>          # (http://nginx.org/en/docs/http/server_names.html)
>          server_names_hash_max_size 32000;
>          server_names_hash_bucket_size 1024;
>
>          # raise default values for php
>          client_max_body_size 20M;
>          client_body_buffer_size 128k;
>
>          ##
>          # Virtual Host Configs
>          ##
>          include /etc/nginx/conf.d/*.conf;
>          include /var/www3/acme_cache/load_balancer/upstream.conf;
>          include /etc/nginx/sites-enabled/*;
>
>          index index.html index.htm ;
>
>          ##
>          # Proxy Settings
>          ##
>
>          # include hostname in request to backend
>          proxy_set_header Host $host;
>
>          # only honor internal Caching policies
>          proxy_ignore_headers X-Accel-Expires Expires Cache-Control;
>
>          # hopefully fixes an issue with cache manager dying
>          resolver 127.0.0.1;
> }
>
>
> Then in /etc/nginx/sites-enabled/ there is eg
> server
> {
>          server_name www.acme.eu acmeblabla.eu;
>          listen 45100;
>          ssl on;
>          ssl_certificate /etc/nginx/ssl/acme_eu.crt;
>          ssl_certificate_key /etc/nginx/ssl/acme_eu.key;
>          access_log /var/log/www/m77/acmesystems_de/log/access.log;
>          error_log /var/log/nginx/vhost_error.log;
>          proxy_cache acme-cache;
>          proxy_cache_key "$scheme$host$proxy_host$uri$is_args$args";
>          proxy_cache_valid       200 302 60m;
>          proxy_cache_valid       404             10m;
>
>          location ~* \.(jpg|gif|png|css|js)
>          {
>                  try_files $uri @proxy;
>          }
>
>          location @proxy
>          {
>                  proxy_pass https://backend-www.acme.eu_p45100;
>          }
>
>          location /
>          {
>                  proxy_pass https://backend-www.acme.eu_p45100;
>          }
>
> }
> upstream backend-www.acme.eu_p45100
> {
>          server 10.1.1.25:45100;
>          server 10.1.1.26:45100;
>          server 10.1.1.27:45100;
>          server 10.1.1.28:45100;
>          server 10.1.1.15:45100;
>          server 10.1.1.18:45100;
>          server 10.1.1.20:45100;
>          server 10.1.1.36:45100;
>          server 10.1.1.39:45100;
>          server 10.1.1.40:45100;
>          server 10.1.1.42:45100;
>          server 10.1.1.21:45100;
>          server 10.1.1.22:45100;
>          server 10.1.1.23:45100;
>          server 10.1.1.29:45100;
>          server 10.1.1.50:45100;
>          server 10.1.1.43:45100;
>          server 10.1.1.45:45100;
>          server 10.1.1.46:45100;
>          server 10.1.1.19:45100;
>          server 10.1.1.10:45100;
> }
>
>
> Isaac
>
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx



More information about the nginx mailing list