Closed GoodGame closed 8 years ago
Hi. First you have to check if this message is coming from the push stream module or not generally the module write a specific message for its errors. And check the configuration for shared memory size. On Sep 19, 2016 17:39, "GoodGame" notifications@github.com wrote:
Hello!
We use a module with alot of server's config's. After nginx start we have in error.log:
ngx_slab_alloc() failed: no memory
Nginx stop immediately.
On the server we have 128G memory.
What's wrong?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/wandenberg/nginx-selective-cache-purge-module/issues/6, or mute the thread https://github.com/notifications/unsubscribe-auth/AAFfNTNecav-22t-oG0LNxKXd66m0G-0ks5qrqzGgaJpZM4KAosy .
Thanks for fast answer.
Error definitely associated with selective-cache-purge-module.
The error appears when i write line:
selective_cache_purge_redis_host "127.0.0.1";
And check the configuration for shared memory size.
How?
I have a lot of config's files:
$ ls -lah /etc/nginx/conf.d/ | wc -l
159
When i remove ~150 config's and i have 8 config's, nginx start. If i add one more config, nginx refuse to start with previous error.
It only happens when i have line:
selective_cache_purge_redis_host "127.0.0.1";
in one config.
Debug version fail's to. With nothing than:
ngx_slab_alloc() failed: no memory
in error.log
nginx -V
nginx version: nginx/1.11.4 built by gcc 4.8.5 20150623 (Red Hat 4.8.5-4) (GCC) built with OpenSSL 1.0.1e-fips 11 Feb 2013 TLS SNI support enabled configure arguments: --prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp --with-threads --user=nginx --group=nginx --add-module=/builddir/build/BUILD/ngx_devel_kit --add-module=/builddir/build/BUILD/nginx-module-vts --add-module=/builddir/build/BUILD/headers-more-nginx-module --add-module=/builddir/build/BUILD/set-misc-nginx-module --add-module=/builddir/build/BUILD/redis2-nginx-module --add-module=/builddir/build/BUILD/nginx-vod-module --add-module=/builddir/build/BUILD/lua-nginx-module --add-module=/builddir/build/BUILD/nginx-upstream-dynamic-servers --add-module=/builddir/build/BUILD/nginx-selective-cache-purge-module --with-http_ssl_module --with-http_realip_module --with-http_addition_module --with-http_sub_module --with-http_stub_status_module --with-http_dav_module --with-http_image_filter_module --with-http_mp4_module --with-http_secure_link_module --with-file-aio --with-http_v2_module --with-cc-opt='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic'
@wandenberg Sorry, could you help in this issue?
@GoodGame can you use the debuging
branch and send me the log messages ?
Sure, but nothing in debug log, nginx just does not start ((
It's easy to reproduce:
Create one config file with many proxy_cache_path locations:
proxy_cache_path /tmp/xxx1 levels=1:2 keys_zone=xxx1:10m loader_files=1000 loader_threshold=450 use_temp_path=off inactive=12h;
proxy_cache_path /tmp/xxx2 levels=1:2 keys_zone=xxx2:10m loader_files=1000 loader_threshold=450 use_temp_path=off inactive=12h;
...
proxy_cache_path /tmp/xxx100 levels=1:2 keys_zone=xxx100:10m loader_files=1000 loader_threshold=450 use_temp_path=off inactive=12h;
And try to start nginx. It will crush.
It does not matter proxy_cache_path will be in one file or one proxy_cache_path per one of 100 files.
user nginx;
worker_processes auto;
worker_rlimit_nofile 819200;
error_log /var/log/nginx/error.log debug;
pid /var/run/nginx.pid;
events {
use epoll;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
server_tokens off;
tcp_nopush on;
tcp_nodelay on;
sendfile on;
proxy_cache_path /tmp/xxx1 levels=1:2 keys_zone=xxx1:10m loader_files=1000 loader_threshold=450 use_temp_path=off inactive=12h;
proxy_cache_path /tmp/xxx2 levels=1:2 keys_zone=xxx2:10m loader_files=1000 loader_threshold=450 use_temp_path=off inactive=12h;
proxy_cache_path /tmp/xxx3 levels=1:2 keys_zone=xxx3:10m loader_files=1000 loader_threshold=450 use_temp_path=off inactive=12h;
proxy_cache_path /tmp/xxx4 levels=1:2 keys_zone=xxx4:10m loader_files=1000 loader_threshold=450 use_temp_path=off inactive=12h;
proxy_cache_path /tmp/xxx5 levels=1:2 keys_zone=xxx5:10m loader_files=1000 loader_threshold=450 use_temp_path=off inactive=12h;
proxy_cache_path /tmp/xxx6 levels=1:2 keys_zone=xxx6:10m loader_files=1000 loader_threshold=450 use_temp_path=off inactive=12h;
proxy_cache_path /tmp/xxx7 levels=1:2 keys_zone=xxx7:10m loader_files=1000 loader_threshold=450 use_temp_path=off inactive=12h;
proxy_cache_path /tmp/xxx8 levels=1:2 keys_zone=xxx8:10m loader_files=1000 loader_threshold=450 use_temp_path=off inactive=12h;
proxy_cache_path /tmp/xxx9 levels=1:2 keys_zone=xxx9:10m loader_files=1000 loader_threshold=450 use_temp_path=off inactive=12h;
proxy_cache_path /tmp/xxx10 levels=1:2 keys_zone=xxx10:10m loader_files=1000 loader_threshold=450 use_temp_path=off inactive=12h;
proxy_cache_path /tmp/xxx11 levels=1:2 keys_zone=xxx11:10m loader_files=1000 loader_threshold=450 use_temp_path=off inactive=12h;
proxy_cache_path /tmp/xxx12 levels=1:2 keys_zone=xxx12:10m loader_files=1000 loader_threshold=450 use_temp_path=off inactive=12h;
proxy_cache_path /tmp/xxx13 levels=1:2 keys_zone=xxx13:10m loader_files=1000 loader_threshold=450 use_temp_path=off inactive=12h;
proxy_cache_path /tmp/xxx14 levels=1:2 keys_zone=xxx14:10m loader_files=1000 loader_threshold=450 use_temp_path=off inactive=12h;
proxy_cache_path /tmp/xxx15 levels=1:2 keys_zone=xxx15:10m loader_files=1000 loader_threshold=450 use_temp_path=off inactive=12h;
proxy_cache_path /tmp/xxx16 levels=1:2 keys_zone=xxx16:10m loader_files=1000 loader_threshold=450 use_temp_path=off inactive=12h;
proxy_cache_path /tmp/xxx17 levels=1:2 keys_zone=xxx17:10m loader_files=1000 loader_threshold=450 use_temp_path=off inactive=12h;
proxy_cache_path /tmp/xxx18 levels=1:2 keys_zone=xxx18:10m loader_files=1000 loader_threshold=450 use_temp_path=off inactive=12h;
proxy_cache_path /tmp/xxx19 levels=1:2 keys_zone=xxx19:10m loader_files=1000 loader_threshold=450 use_temp_path=off inactive=12h;
proxy_cache_path /tmp/xxx20 levels=1:2 keys_zone=xxx20:10m loader_files=1000 loader_threshold=450 use_temp_path=off inactive=12h;
proxy_cache_path /tmp/xxx21 levels=1:2 keys_zone=xxx21:10m loader_files=1000 loader_threshold=450 use_temp_path=off inactive=12h;
proxy_cache_path /tmp/xxx22 levels=1:2 keys_zone=xxx22:10m loader_files=1000 loader_threshold=450 use_temp_path=off inactive=12h;
proxy_cache_path /tmp/xxx23 levels=1:2 keys_zone=xxx23:10m loader_files=1000 loader_threshold=450 use_temp_path=off inactive=12h;
proxy_cache_path /tmp/xxx24 levels=1:2 keys_zone=xxx24:10m loader_files=1000 loader_threshold=450 use_temp_path=off inactive=12h;
proxy_cache_path /tmp/xxx25 levels=1:2 keys_zone=xxx25:10m loader_files=1000 loader_threshold=450 use_temp_path=off inactive=12h;
proxy_cache_path /tmp/xxx26 levels=1:2 keys_zone=xxx26:10m loader_files=1000 loader_threshold=450 use_temp_path=off inactive=12h;
proxy_cache_path /tmp/xxx27 levels=1:2 keys_zone=xxx27:10m loader_files=1000 loader_threshold=450 use_temp_path=off inactive=12h;
proxy_cache_path /tmp/xxx28 levels=1:2 keys_zone=xxx28:10m loader_files=1000 loader_threshold=450 use_temp_path=off inactive=12h;
proxy_cache_path /tmp/xxx29 levels=1:2 keys_zone=xxx29:10m loader_files=1000 loader_threshold=450 use_temp_path=off inactive=12h;
proxy_cache_path /tmp/xxx30 levels=1:2 keys_zone=xxx30:10m loader_files=1000 loader_threshold=450 use_temp_path=off inactive=12h;
proxy_cache_path /tmp/xxx31 levels=1:2 keys_zone=xxx31:10m loader_files=1000 loader_threshold=450 use_temp_path=off inactive=12h;
proxy_cache_path /tmp/xxx32 levels=1:2 keys_zone=xxx32:10m loader_files=1000 loader_threshold=450 use_temp_path=off inactive=12h;
proxy_cache_path /tmp/xxx33 levels=1:2 keys_zone=xxx33:10m loader_files=1000 loader_threshold=450 use_temp_path=off inactive=12h;
proxy_cache_path /tmp/xxx34 levels=1:2 keys_zone=xxx34:10m loader_files=1000 loader_threshold=450 use_temp_path=off inactive=12h;
proxy_cache_path /tmp/xxx35 levels=1:2 keys_zone=xxx35:10m loader_files=1000 loader_threshold=450 use_temp_path=off inactive=12h;
proxy_cache_path /tmp/xxx36 levels=1:2 keys_zone=xxx36:10m loader_files=1000 loader_threshold=450 use_temp_path=off inactive=12h;
proxy_cache_path /tmp/xxx37 levels=1:2 keys_zone=xxx37:10m loader_files=1000 loader_threshold=450 use_temp_path=off inactive=12h;
proxy_cache_path /tmp/xxx38 levels=1:2 keys_zone=xxx38:10m loader_files=1000 loader_threshold=450 use_temp_path=off inactive=12h;
proxy_cache_path /tmp/xxx39 levels=1:2 keys_zone=xxx39:10m loader_files=1000 loader_threshold=450 use_temp_path=off inactive=12h;
selective_cache_purge_redis_host "127.0.0.1";
}
This simple config.
$ nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: [crit] ngx_slab_alloc() failed: no memory
nginx: configuration file /etc/nginx/nginx.conf test failed
@wandenberg Could you help?
If i set (8 * ngx_pagesize) in this line, nginx starts with config above.
I think there is error in shm_size calculation.
@wandenberg Can you fix it?
Hello!
We use a module with alot of server's config's. After nginx start we have in error.log:
ngx_slab_alloc() failed: no memory
Nginx stop immediately.
On the server we have 128G memory.
What's wrong?