$ cat /etc/redhat-releaseCentOS Linux release 7.4.1708 (Core)
$ uname -aLinux hostname 4.13.1-1.el7.elrepo.x86_64 #1 SMP Sun Sep 10 11:11:27 EDT 2017 x86_64 x86_64 x86_64 GNU/Linux
$ nginx -V
nginx version: openresty/1.13.6.1
built by gcc 4.8.5 20150623 (Red Hat 4.8.5-16) (GCC)
built with OpenSSL 1.0.2n 7 Dec 2017
TLS SNI support enabled
configure arguments: --prefix=/usr/local/openresty/nginx --with-cc-opt=-O2 --add-module=../ngx_devel_kit-0.3.0 --add-module=../echo-nginx-module-0.61 --add-module=../xss-nginx-module-0.05 --add-module=../ngx_coolkit-0.2rc3 --add-module=../set-misc-nginx-module-0.31 --add-module=../form-input-nginx-module-0.12 --add-module=../encrypted-session-nginx-module-0.07 --add-module=../srcache-nginx-module-0.31 --add-module=../ngx_lua-0.10.11 --add-module=../ngx_lua_upstream-0.07 --add-module=../headers-more-nginx-module-0.33 --add-module=../array-var-nginx-module-0.05 --add-module=../memc-nginx-module-0.18 --add-module=../redis2-nginx-module-0.14 --add-module=../redis-nginx-module-0.3.7 --add-module=../rds-json-nginx-module-0.15 --add-module=../rds-csv-nginx-module-0.08 --add-module=../ngx_stream_lua-0.0.3 --with-ld-opt=-Wl,-rpath,/usr/local/openresty/luajit/lib --sbin-path=/usr/sbin --with-http_geoip_module --pid-path=/var/run/nginx.pid --with-http_stub_status_module --with-dtrace-probes --with-pcre-jit --with-ipv6 --with-http_ssl_module --with-openssl=/home/platform/installers/openresty-1.13.6.1/../../openssl-1.0.2n --with-stream --with-stream_ssl_module
[root@machine stapxx]# ./samples/sample-bt-leaks.sxx -x 4457 --arg time=5 -D STP_NO_OVERLOAD -D MAXMAPENTRIES=10000 > a.bt
[root@machine openresty-systemtap-toolkit]# ./ngx-leaked-pools -p 4457Tracing 4457 (/usr/sbin/nginx)...Hit Ctrl-C to end.^C586 pools leaked at backtrace 0x4546da 0x47153a 0x4791f7 0x470d4b 0x477362 0x475e44 0x4777c4 0x4781cb 0x452052 0x7f64a9bb3c05 0x4523ae31 pools leaked at backtrace 0x4546da 0x515616 0x51640c 0x7f64aa9096ea 0x507a79 0x50ace6 0x50b05b 0x50a83c 0x488b1e 0x483705 0x48dee3 0x48e75b 0x4791f7 0x470d4b 0x477362 0x475e44 0x4777c4 0x4781cb 0x452052 0x7f64a9bb3c051 pools leaked at backtrace 0x4546da 0x520827 0x471153 0x470d77 0x477362 0x475e44 0x4777c4 0x4781cb 0x452052 0x7f64a9bb3c05 0x4523ae1 pools leaked at backtrace 0x4546da 0x515616 0x51640c 0x7f64aa9096ea 0x507a79 0x50ace6 0x50b05b 0x50a83c 0x488b1e 0x483705 0x48dee3 0x48e75b 0x471220 0x470d84 0x477362 0x475e44 0x4777c4 0x4781cb 0x452052 0x7f64a9bb3c05
Run the command "./ngx-backtrace -p 4457 <backtrace>" to get details.For total 25009 pools allocated.
[root@machine openresty-systemtap-toolkit]# ./ngx-backtrace -p 4457 0x4546da 0x47153a 0x4791f7 0x470d4b 0x477362 0x475e44 0x4777c4 0x4781cb 0x452052 0x7f64a9bb3c05 0x4523aengx_create_pool/home/platform/installers/openresty-1.13.6.1/build/nginx-1.13.6/src/core/ngx_palloc.c:43ngx_event_accept/home/platform/installers/openresty-1.13.6.1/build/nginx-1.13.6/src/event/ngx_event_accept.c:162ngx_epoll_process_events/home/platform/installers/openresty-1.13.6.1/build/nginx-1.13.6/src/event/modules/ngx_epoll_module.c:902ngx_process_events_and_timers/home/platform/installers/openresty-1.13.6.1/build/nginx-1.13.6/src/event/ngx_event.c:259ngx_worker_process_cycle/home/platform/installers/openresty-1.13.6.1/build/nginx-1.13.6/src/os/unix/ngx_process_cycle.c:817ngx_spawn_process/home/platform/installers/openresty-1.13.6.1/build/nginx-1.13.6/src/os/unix/ngx_process.c:205ngx_start_worker_processes/home/platform/installers/openresty-1.13.6.1/build/nginx-1.13.6/src/os/unix/ngx_process_cycle.c:399 (discriminator 2)ngx_master_process_cycle/home/platform/installers/openresty-1.13.6.1/build/nginx-1.13.6/src/os/unix/ngx_process_cycle.c:252main/home/platform/installers/openresty-1.13.6.1/build/nginx-1.13.6/src/core/nginx.c:384????:0_start??:?
[root@machine openresty-systemtap-toolkit]# ./ngx-backtrace -p 4457 0x4546da 0x515616 0x51640c 0x7f64aa9096ea 0x507a79 0x50ace6 0x50b05b 0x50a83c 0x488b1e 0x483705 0x48dee3 0x48e75b 0x4791f7 0x470d4b 0x477362 0x475e44 0x4777c4 0x4781cb 0x452052 0x7f64a9bb3c05ngx_create_pool/home/platform/installers/openresty-1.13.6.1/build/nginx-1.13.6/src/core/ngx_palloc.c:43ngx_http_lua_socket_resolve_retval_handler/home/platform/installers/openresty-1.13.6.1/build/nginx-1.13.6/../ngx_lua-0.10.11/src/ngx_http_lua_socket_tcp.c:1101ngx_http_lua_socket_tcp_connect/home/platform/installers/openresty-1.13.6.1/build/nginx-1.13.6/../ngx_lua-0.10.11/src/ngx_http_lua_socket_tcp.c:699????:0ngx_http_lua_run_thread/home/platform/installers/openresty-1.13.6.1/build/nginx-1.13.6/../ngx_lua-0.10.11/src/ngx_http_lua_util.c:1014ngx_http_lua_content_by_chunk/home/platform/installers/openresty-1.13.6.1/build/nginx-1.13.6/../ngx_lua-0.10.11/src/ngx_http_lua_contentby.c:122ngx_http_lua_content_handler_file/home/platform/installers/openresty-1.13.6.1/build/nginx-1.13.6/../ngx_lua-0.10.11/src/ngx_http_lua_contentby.c:285ngx_http_lua_content_handler/home/platform/installers/openresty-1.13.6.1/build/nginx-1.13.6/../ngx_lua-0.10.11/src/ngx_http_lua_contentby.c:223ngx_http_core_content_phase/home/platform/installers/openresty-1.13.6.1/build/nginx-1.13.6/src/http/ngx_http_core_module.c:1173ngx_http_core_run_phases/home/platform/installers/openresty-1.13.6.1/build/nginx-1.13.6/src/http/ngx_http_core_module.c:864ngx_http_process_request/home/platform/installers/openresty-1.13.6.1/build/nginx-1.13.6/src/http/ngx_http_request.c:1953ngx_http_process_request_line/home/platform/installers/openresty-1.13.6.1/build/nginx-1.13.6/src/http/ngx_http_request.c:1051ngx_epoll_process_events/home/platform/installers/openresty-1.13.6.1/build/nginx-1.13.6/src/event/modules/ngx_epoll_module.c:902ngx_process_events_and_timers/home/platform/installers/openresty-1.13.6.1/build/nginx-1.13.6/src/event/ngx_event.c:259ngx_worker_process_cycle/home/platform/installers/openresty-1.13.6.1/build/nginx-1.13.6/src/os/unix/ngx_process_cycle.c:817ngx_spawn_process/home/platform/installers/openresty-1.13.6.1/build/nginx-1.13.6/src/os/unix/ngx_process.c:205ngx_start_worker_processes/home/platform/installers/openresty-1.13.6.1/build/nginx-1.13.6/src/os/unix/ngx_process_cycle.c:399 (discriminator 2)ngx_master_process_cycle/home/platform/installers/openresty-1.13.6.1/build/nginx-1.13.6/src/os/unix/ngx_process_cycle.c:252main/home/platform/installers/openresty-1.13.6.1/build/nginx-1.13.6/src/core/nginx.c:384????:0
@ Mobile World Congress, Barcelona, February 26 - March 1
@ ad:tech, New Delhi, March 8 - 9
@ Digital Marketing Summit, Seoul, March 16
@ Game Developers Conference, San Francisco, March 19 - 23
Click here to meet us at an event near you.--
You received this message because you are subscribed to the Google Groups "openresty-en" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openresty-en...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
<a.svg>
# user as which the nginx worker threads with spawnuser admin;
# number of worker processesworker_processes auto;
#worker_cpu_affinity auto;
# maximum number of files which can be opened at the same timeworker_rlimit_nofile 999999;
# TODO: need to explain thisevents { accept_mutex off; multi_accept on; worker_connections 65536; use epoll;}
# environment variablesenv PLATFORM_ENV=production;
http { variables_hash_max_size 1024; variables_hash_bucket_size 1024;
sendfile on; tcp_nopush on; tcp_nodelay on;
# to hide nginx version from the header server_tokens off;
# GeoIP dat files geoip_org "data/geoip/GeoIPISP.dat"; geoip_city "data/geoip/GeoIPCity.dat"; geoip_proxy 0.0.0.0/0; geoip_proxy_recursive off;
# initialization constants init_by_lua_file "config/environments/production/init.lua";
# include common config. Init shared DICT and lua path include "../common.conf";
# include exchange config include "exchange.conf";}
exchange.conf
log_format ACCESS_LOG $access_log;log_format KYT_ACCESS_LOG $kyt_access_log;server{ listen 80; listen 443 ssl; lua_code_cache on;
ssl_dhparam /home/user/a.pem; ssl_prefer_server_ciphers on;
ssl_certificate /etc/ssl/certs/a.crt; ssl_certificate_key /etc/ssl/certs/a.key;
ssl_buffer_size 16k;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-GCM-SHA384:ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:RSA+AESGCM:RSA+AES:!aNULL:!MD5:!DSS;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_session_cache shared:SSL:20m; ssl_session_timeout 180m;
client_body_in_single_buffer on; client_body_buffer_size 24k; client_max_body_size 24k;
keepalive_requests 1000000; keepalive_timeout 120s;
server_name ~^([a-z0-9]*).test.com$;
# change server name in header more_set_headers 'Server: Prod/1.0s';
# log set $access_log ""; access_log "logs/req-acc.log" ACCESS_LOG; error_log "logs/production.error.log" error;
set $kyt_access_log ""; access_log "logs/production.kyt-access.log" KYT_ACCESS_LOG;
set $V $1; set $EXCHANGE_REQUEST_URL "http://${V}.hostname.com/";
location / { content_by_lua_file 'code/controllers/request.lua'; #content_by_lua "ngx.exit(204)"; }
location /compressed { gzip on; gzip_vary on; gzip_types 'application/json' 'text/plain'; content_by_lua_file 'code/controllers/request.lua'; #content_by_lua "ngx.exit(204)"; }
include "../ignore.conf";}