Giter Site home page Giter Site logo

Comments (10)

wandenberg avatar wandenberg commented on July 17, 2024

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" [email protected] 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
#6,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAFfNTNecav-22t-oG0LNxKXd66m0G-0ks5qrqzGgaJpZM4KAosy
.

from nginx-selective-cache-purge-module.

GoodGame avatar GoodGame commented on July 17, 2024

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?

from nginx-selective-cache-purge-module.

GoodGame avatar GoodGame commented on July 17, 2024

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'

from nginx-selective-cache-purge-module.

GoodGame avatar GoodGame commented on July 17, 2024

@wandenberg Sorry, could you help in this issue?

from nginx-selective-cache-purge-module.

wandenberg avatar wandenberg commented on July 17, 2024

@GoodGame can you use the debuging branch and send me the log messages ?

from nginx-selective-cache-purge-module.

GoodGame avatar GoodGame commented on July 17, 2024

Sure, but nothing in debug log, nginx just does not start ((

from nginx-selective-cache-purge-module.

GoodGame avatar GoodGame commented on July 17, 2024

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.

from nginx-selective-cache-purge-module.

GoodGame avatar GoodGame commented on July 17, 2024
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

from nginx-selective-cache-purge-module.

GoodGame avatar GoodGame commented on July 17, 2024

@wandenberg Could you help?

from nginx-selective-cache-purge-module.

GoodGame avatar GoodGame commented on July 17, 2024

https://github.com/wandenberg/nginx-selective-cache-purge-module/blob/5eecdf50f7c44ddb35e96a83fc809dd35166dbed/src/ngx_selective_cache_purge_module_setup.c#L287

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?

from nginx-selective-cache-purge-module.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.