<div style="color:#000; font-size: 14px;font-family: arial;"><div><br></div><div>Thanks! <br></div><div>I builded the nginx-1.14.2 from the source instead of apt package(Debian9), then it goes well(with the same config file).<br></div><div>And on FreeBSD, it has no problem with same version of nginx than Debian9.</div><div>And I migrated the path to a single directory.<br></div><div><br></div><div><br></div></div><div id="spnEditorSign" name="100"><div><div style="font-size: 14px;font-family: arial;"><div><br></div><div><p style="margin: 0pt;"><span style="font-family:黑体;font-size:12.0000pt;">潘永华</span><span style="font-family:宋体;font-size:12.0000pt;"><br></span><span style="font-family:黑体;font-size:10.0000pt;">手机: 13166322138<br>邮箱: u_can@163.com</span><span style="font-family:宋体;font-size:12.0000pt;"><br></span><span style="font-family:黑体;font-size:10.0000pt;">网站: http://www.panswork.com</span><br></p><br></div></div></div></div><div><br></div><!-- jy5ContentSuffix --><div>在2019年03月26 17时47分, "nginx-request"<nginx-request@nginx.org>写道:</div><blockquote id="isReplyContent" style="padding-left: 1ex; margin: 0px 0px 0px 0.8ex; border-left: 1px solid rgb(204, 204, 204);"><br>Send nginx mailing list submissions to<br>    nginx@nginx.org<br><br>To subscribe or unsubscribe via the World Wide Web, visit<br>    http://mailman.nginx.org/mailman/listinfo/nginx<br>or, via email, send a message with subject or body 'help' to<br>    nginx-request@nginx.org<br><br>You can reach the person managing the list at<br>    nginx-owner@nginx.org<br><br>When replying, please edit your Subject line so it is more specific<br>than "Re: Contents of nginx digest..."<br><br><br>Today's Topics:<br><br>   1. Re: Possible memory leak? (Maxim Dounin)<br>   2. Re: a proxy_module question ,maybe a bug? (Maxim Dounin)<br>   3. Re: Mapping url to physical urls using lua script or<br>      something else. (Hemant Bist)<br>   4. TCP connection limit on dynamic backend (R, Rajkumar (Raj))<br>   5. Is it possible to add milliseconds in error.log and also<br>      timestamps (sivak)<br><br><br>----------------------------------------------------------------------<br><br>Message: 1<br>Date: Mon, 25 Mar 2019 15:39:49 +0300<br>From: Maxim Dounin <mdounin@mdounin.ru><br>To: nginx@nginx.org<br>Subject: Re: Possible memory leak?<br>Message-ID: <20190325123949.GU1877@mdounin.ru><br>Content-Type: text/plain; charset=us-ascii<br><br>Hello!<br><br>On Thu, Mar 21, 2019 at 05:55:23PM -0400, wkbrad wrote:<br><br>> Thanks again!  I was a little confused at first because your tests in<br>> freebsd were so much different than mine but then I found what you did<br>> wrong.<br>> <br>> You were testing the 2nd reload but the issue can only be seen on the first<br>> reload.  Here is my test to show what I mean.<br><br>As can be seen from the pid numbers provided, first ps/top output <br>in my previous message is from the initial nginx start, and the <br>reload shown is the first one.<br><br>What looks like an important factor is "junk:true" in my <br>malloc.conf.  Without at least "junk:free" I indeed see similar <br>results to yours - most likely because kernel fails to free pages <br>which are referenced from multiple processes when madvise() is <br>called.<br><br>[...]<br><br>-- <br>Maxim Dounin<br>http://mdounin.ru/<br><br><br>------------------------------<br><br>Message: 2<br>Date: Mon, 25 Mar 2019 16:26:23 +0300<br>From: Maxim Dounin <mdounin@mdounin.ru><br>To: nginx@nginx.org<br>Subject: Re: a proxy_module question ,maybe a bug?<br>Message-ID: <20190325132622.GV1877@mdounin.ru><br>Content-Type: text/plain; charset=utf-8<br><br>Hello!<br><br>On Sat, Mar 23, 2019 at 12:20:26AM +0800, ?? wrote:<br><br>> nginx version: nginx/1.10.3<br>> uname: Linux  4.9.0-8-amd64 #1 SMP Debian 4.9.144-3.1 (2019-02-19) x86_64 GNU/Linux<br>> VPS: Linode $5<br>> <br>> <br>> <br>> I set about 900 subsite like this:<br>> <br>> <br>>     proxy_cache_path /var/cache/nginx/abc.com/aaa levels=1:2 use_temp_path=off keys_zone=aaa.abc.com:64k inactive=8h max_size=128m;<br>>     proxy_cache_path /var/cache/nginx/abc.com/bbb levels=1:2 use_temp_path=off keys_zone=bbb.abc.com:64k inactive=8h max_size=128m;<br>>     ...<br>>     the list is 900+<br><br>Just a side note: it is usually a bad idea to configure individual <br>cache paths for each site, as it consumes much more resources than <br>using a single cache for all sites.  Instead, consider using a <br>single proxy_cache_path and add site identifier to <br>proxy_cache_key.<br><br>[...]<br><br>> but when I type run it again at once, the nginx will go wrong in minutes:<br>> <br>> <br>> 2019/03/22 10:30:03 [alert] 6356#6356: ignore long locked inactive cache entry 3391b383577454e8dfb6337e060c1d22, count:1<br>> 2019/03/22 10:30:03 [alert] 6356#6356: ignore long locked inactive cache entry 3391b383577454e8dfb6337e060c1d22, count:1<br><br>The "ignore long locked inactive cache entry" alert indicates that <br>nginx was trying to remove a cache entry, but failed to do this <br>because the entry was locked.  This may be either result of a bug, <br>or may happen if a worker process is killed or crashed.  That is, <br>this may happen, e.g., if your server run out of memory at some <br>point and OOM-killer killed an nginx worker process.  To find out <br>what actually happened you may want to investigate error log <br>before the first "ignore long locked" alert.<br><br>On the other hand, the first thing you may want to do is to <br>upgrade - nginx 1.10.3 is rather old and no longer supported.  <br>Invesigating anything with nginx 1.10.3 hadly make sense.<br><br>[...]<br><br>-- <br>Maxim Dounin<br>http://mdounin.ru/<br><br><br>------------------------------<br><br>Message: 3<br>Date: Mon, 25 Mar 2019 09:39:15 -0700<br>From: Hemant Bist <hemantbist@gmail.com><br>To: nginx@nginx.org<br>Subject: Re: Mapping url to physical urls using lua script or<br>    something else.<br>Message-ID:<br>    <CAHgSXQnaTFp-BxW1PZ0Q-6F3yZ85pyHneUBRrg_7vKvdZHN+gw@mail.gmail.com><br>Content-Type: text/plain; charset="utf-8"<br><br>Thanks peter,<br>In this case, both the new set of urls and old set of url are going to be<br>exposed to different set of users. (And there are some DRM  related details<br>I omitted in the email)<br>(similar to what  you are suggesting ) : One of the changes I am testing is<br>simply copying the files/linking the files( which means serving tiles via<br>nginx would be trivial , at the cost of increasing memory /  complications<br>in the backend scripts that sync the data).<br><br>1) Computationally the mapping is not that hard, and the production server<br>is has lot of CPU. So I am hoping that we can get away  with some sort of<br>simple lua script.<br><br>2) Additionally it looks like a small percentage of the urls(both number<br>and traffic wise) are served by lookup on a small redis db, and lua. So no<br>major changes would be required in installation etc : as long as it scales<br>decently...<br>HB<br>HB<br><br><br><br>On Sat, Mar 23, 2019 at 7:39 PM Peter Booth via nginx <nginx@nginx.org><br>wrote:<br><br>> Here?s my opinion:<br>><br>> You can do this however you want. It?s your website. Most of my work has<br>> been for other people. When I was working on my own startup it made me<br>> honest. Nothing was dynamic. The rationale  was ?do everything ahead of<br>> time so users never wait for anything and the site has 100% uptime?.<br>><br>> So for your usecase - why make your users pay the price of your hashmap<br>> lookup? Why not publish/rewrite your content to the ?right? site structure<br>> ahead of time? Sure, nginx with openresty / lua can be a super fast<br>> appserver. But boring solutions beat clever every time.<br>><br>> My two cents,<br>><br>> Peter<br>><br>> Sent from my iPhone<br>><br>> > On Mar 23, 2019, at 8:17 PM, Hemant Bist <hemantbist@gmail.com> wrote:<br>> ><br>> > Hi,<br>> > I want to know if this a right way to make the change ( or if there is a<br>> better /recommended method). So far we have only tweaked the configuration<br>> of nginx which scales very nicely for us  The change I need to do looks<br>> like a common case to me.<br>> ><br>> > Currently our urls map directly to the local dir structure<br>> > e.g. the url /foo/10000/1234/9999/my.jpg is local file<br>> /var/www/html/foo/10000/1234/9999/my.jpg so<br>> ><br>> > Now the url /foo/first/second/third/my.jpg will map to<br>> /newfoo/new_first/new_second/new_third/my.jpg<br>> > where newfoo folder is done by lookup of a  static Hash_map/table of<br>> about 10000 to 20000 entries.<br>> > new_first (new_second and new_third) are calculated by some arithmatic<br>> operation on first(second and new  third).<br>> ><br>> > My plan is: a) pass all handling to a lua script that will do<br>> internal_redirect to the correct physical url... And do a load test to make<br>> sure that is not too much performance hit.  [ I haven't implemented it, but<br>> it looks possible from the examples I have looked at so far]<br>> ><br>> > Best,<br>> > HB<br>> ><br>> ><br>> > _______________________________________________<br>> > nginx mailing list<br>> > nginx@nginx.org<br>> > http://mailman.nginx.org/mailman/listinfo/nginx<br>><br>> _______________________________________________<br>> nginx mailing list<br>> nginx@nginx.org<br>> http://mailman.nginx.org/mailman/listinfo/nginx<br>-------------- next part --------------<br>An HTML attachment was scrubbed...<br>URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20190325/f4146dd0/attachment-0001.html><br><br>------------------------------<br><br>Message: 4<br>Date: Tue, 26 Mar 2019 09:13:44 +0000<br>From: "R, Rajkumar (Raj)" <rajkumaradass@avaya.com><br>To: "nginx@nginx.org" <nginx@nginx.org><br>Subject: TCP connection limit on dynamic backend<br>Message-ID:<br>    <MN2PR15MB318137AFE176F967DB36AAF0A65F0@MN2PR15MB3181.namprd15.prod.outlook.com><br>    <br>Content-Type: text/plain; charset="us-ascii"<br><br>Hi,<br><br>Using nginx in TCP/Stream mode and would like to limit the number of active connection to my backend server whereas the backend is resolved dynamically based on the SNI header ($ssl_preread_server_name).  But this does not allow any connections to the backend with below config.  I see examples of limiting backend connections if the backend server block is pre configured.<br><br>Could you please confirm if this achievable or supported currently with Stream mode?<br><br>Below is the related config part.<br><br>map $ssl_preread_server_name $backend_svr {<br>      ~^(\w+).test.com $1-tcp.default.svc.cluster.local;<br>  }<br><br>limit_conn_zone $ssl_preread_server_name zone=perserver:10m;<br><br>server {<br>      listen      443 reuseport so_keepalive=30s:30s:3 backlog=64999;<br>      proxy_pass $backend_svr:443;<br>      limit_conn perserver 255;<br>      ssl_preread on;<br>}<br><br><br><br>thanks,<br>raj<br>+918067153382<br><br>-------------- next part --------------<br>An HTML attachment was scrubbed...<br>URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20190326/415cd5b3/attachment-0001.html><br><br>------------------------------<br><br>Message: 5<br>Date: Tue, 26 Mar 2019 05:47:51 -0400<br>From: "sivak" <nginx-forum@forum.nginx.org><br>To: nginx@nginx.org<br>Subject: Is it possible to add milliseconds in error.log and also<br>    timestamps<br>Message-ID:<br>    <15d1757b0ed2bcc2de430d9f3a7b3a67.NginxMailingListEnglish@forum.nginx.org><br>    <br>Content-Type: text/plain; charset=UTF-8<br><br>Is it possible to add milliseconds in error.log and also to include<br>timestamps in the output after executing below commands<br><br>$NGINX_EXECUTABLE_FILE -I<br>$NGINX_EXECUTABLE_FILE -P<br><br>Posted at Nginx Forum: https://forum.nginx.org/read.php?2,283506,283506#msg-283506<br><br><br><br>------------------------------<br><br>Subject: Digest Footer<br><br>_______________________________________________<br>nginx mailing list<br>nginx@nginx.org<br>http://mailman.nginx.org/mailman/listinfo/nginx<br><br>------------------------------<br><br>End of nginx Digest, Vol 113, Issue 33<br>**************************************<br></blockquote><br><br><span title="neteasefooter"><p> </p></span>