<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Two questions: <div class=""><br class=""></div><div class="">1. how are you measuring memory consumption?</div><div class="">2. How much physical memory do you have on your host?<br class=""><div class=""><br class=""></div><div class=""><br class=""><div class="">Assuming that you are running on Linux, can you use <font face="Courier New" class="">pidstat -r -t -u -v -w -C “nginx”</font></div><div class="">to confirm the process’s memory consumption, </div><div class=""><br class=""></div><div class="">and <font face="Courier New" class="">cat /var/meminfo</font> to view a detailed description of how memory is being used onto entire host.</div><div class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Mar 14, 2018, at 1:05 PM, Matthew Smith <<a href="mailto:matthew.smith@acquia.com" class="">matthew.smith@acquia.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Hello,<div class=""><br class=""></div><div class="">I have encountered what I consider to be an interesting behavior. We have Nginx 1.12.1 configured to do SSL termination as well as reverse proxy. Whenever there is a traffic spike (300 req/s > 1000 req/s, 3k active connections > 20k active connections), there is a corresponding spike in Nginx memory consumption. In this case 500M > 8G across 10 worker processes. What is interesting is that Nginx never seems to release this memory after the traffic returns to normal. Is this expected? What is Nginx using this memory for? Is there a configuration that will rotate the workers based on some metric in order to return memory to the system?</div><div class=""><br class=""></div><div class="">Requests per second:</div><div class=""><a href="https://www.dropbox.com/s/cl2yqdxgqk2fn89/Screenshot%202018-03-14%2012.38.10.png?dl=0" class="">https://www.dropbox.com/s/cl2yqdxgqk2fn89/Screenshot%202018-03-14%2012.38.10.png?dl=0</a><br class=""></div><div class=""><br class=""></div><div class="">Active connections:</div><div class=""><a href="https://www.dropbox.com/s/s3j4oux77op3svo/Screenshot%202018-03-14%2012.44.14.png?dl=0" class="">https://www.dropbox.com/s/s3j4oux77op3svo/Screenshot%202018-03-14%2012.44.14.png?dl=0</a><br class=""></div><div class=""><br class=""></div><div class="">Total Nginx memory usage:</div><div class=""><a href="https://www.dropbox.com/s/ihp5zxky2mgd2hr/Screenshot%202018-03-14%2012.44.43.png?dl=0" class="">https://www.dropbox.com/s/ihp5zxky2mgd2hr/Screenshot%202018-03-14%2012.44.43.png?dl=0</a><br class=""></div><div class=""><br class=""></div><div class="">Thanks,</div><div class=""><br class=""></div><div class="">Matt</div></div>
_______________________________________________<br class="">nginx mailing list<br class=""><a href="mailto:nginx@nginx.org" class="">nginx@nginx.org</a><br class="">http://mailman.nginx.org/mailman/listinfo/nginx</div></blockquote></div><br class=""></div></div></div></body></html>