Hi, The key_zone is just the name of a shared memory area where some metadata about the cache entries will be saved. The files stored on the cache_path does not use the key_zone. They are different configurations to two different purposes. To do what you are imagining, the file stored on cache_path must have the key_zone on its name, something like /tmp/cache/*zone1*/0/00/9fc611e1a487c7a86585dby wandenberg - Nginx Mailing List - English
The configuration file used to start the server is the same been used to stop it? If you start as nginx -c /some/confi/file.conf and stop as nginx -c /some/confi/file.conf -s stop it should work. If you are only doing nginx -s stop it will use default configuration that point to another pid file On Fri, Aug 1, 2014 at 12:11 PM, Mapper Uno <lists@ruby-forum.com> wrote: > Hi, > >by wandenberg - Nginx Mailing List - English
Hi, some time ago I had a similar issue and I grab some parts of nginx internals modules and did one specific to me. My issue was to use the first XForwardedFor IP, but only when the client address was the Google Chrome Proxy. I don't know if this is the best approach, but I check the client ip using the reverse dns and, if the ip came from Google, I change it for the first ip on XFowardedby wandenberg - Nginx Mailing List - English
Thanks agentzh, Maxim and Igor On Tue, Jun 3, 2014 at 11:00 AM, Maxim Dounin <mdounin@mdounin.ru> wrote: > Hello! > > On Mon, Jun 02, 2014 at 08:42:50PM +0400, Maxim Dounin wrote: > > > Hello! > > > > On Sat, May 31, 2014 at 11:46:28PM -0300, Wandenberg Peixoto wrote: > > > > > Hello Maxim, > > > > > > I executed my tests agaiby wandenberg - Nginx Development
Hello Maxim, I executed my tests again and seems that your improved patch version is working fine too. Did you plan to merge it on nginx core soon? -agentzh Did you have opportunity to check if it works for you? Regards On Wed, May 28, 2014 at 3:38 PM, Maxim Dounin <mdounin@mdounin.ru> wrote: > Hello! > > On Sun, May 11, 2014 at 10:13:52PM -0700, Yichun Zhang (agentzh) wrotby wandenberg - Nginx Development
Hello Maxim, I executed my tests again and seems that your improved patch version is working fine too. Did you plan to merge it on nginx core soon? Regards On Wed, May 28, 2014 at 3:41 PM, Maxim Dounin <mdounin@mdounin.ru> wrote: > Hello! > > On Wed, Jan 22, 2014 at 08:51:50PM +0400, Maxim Dounin wrote: > > > Hello! > > > > On Wed, Jan 22, 2014 at 01:39:54by wandenberg - Nginx Development
Check the nginx_process_slot or nginx_process_pid On May 13, 2014 10:20 PM, "Jordan Newman" <phoem@phoempc.com> wrote: > Is there a way from an nginx module to see which # worker it is? Thank you. > > -- > Jordan Newman > > _______________________________________________ > nginx-devel mailing list > nginx-devel@nginx.org > http://mailman.nginx.org/mailmby wandenberg - Nginx Development
As far as I know, ngx_pool_t are created on process memory area, so, after a reload the new process has a new memory area and do not have access to the old. You can recompile the regex on your module startup, at init worker hook. On Wed, May 7, 2014 at 6:16 AM, MAGNIEN, Thierry <thierry.magnien@sfr.com>wrote: > Hi, > > I wrote a Nginx module and am facing a problem: I need to keby wandenberg - Nginx Development
Hello Maxim, did you have opportunity to take a look on this last patch? Regards, Wandenberg On Thu, Dec 26, 2013 at 10:12 PM, Wandenberg Peixoto <wandenberg@gmail.com>wrote: > Hello Maxim, > > I changed the patch to check only the p->next pointer. > And checking if the page is in an address less than the (pool->pages + > pages). > > + ngx_slab_page_t *preby wandenberg - Nginx Development
Hello Maxim, I changed the patch to check only the p->next pointer. And checking if the page is in an address less than the (pool->pages + pages). + ngx_slab_page_t *prev, *p; + ngx_uint_t pages; + size_t size; + + size = pool->end - (u_char *) pool - sizeof(ngx_slab_pool_t); + pages = (ngx_uint_t) (size / (ngx_pagesize + sizeof(ngx_slab_page_t))); + +by wandenberg - Nginx Development
Hi Maxim, sorry for the long delay. I hope you remember my issue. In attach is the new patch with the changes you suggest. Can you check it again? I hope it can be applied to nginx code now. About this point "2. There is probably no need to check both prev and next.", I check both pointers to avoid a segmentation fault, since in some situations the next can be NULL and the prev may poiby wandenberg - Nginx Development
Hi Maxim, did you have opportunity to take a look on this patch? Regards, Wandenberg On Wed, Jul 31, 2013 at 12:28 AM, Wandenberg Peixoto <wandenberg@gmail.com>wrote: > Hello! > > Thanks for your help. I hope that the patch be OK now. > I don't know if the function and variable names are on nginx pattern. > Feel free to change the patch. > If you have any other point bby wandenberg - Nginx Development
Try to use the proxy_cache_lock configuration, I think this is what you are looking for. Don't forget to configure the proxy_cache_lock_timeout to your use case. On Aug 26, 2013 6:54 PM, "Alex Garzão" <alex.garzao@azion.com> wrote: > Hello guys, > > This is my first post to nginx-devel. > > First of all, I would like to congratulate NGINX developers. NGINX is >by wandenberg - Nginx Development
Hi, is there a way to, inside a module, be notified when the Nginx process received a signal to reload? I need to stop some timers and do cleanup routines when a worker is on "worker process is shutting down" state to allow it to completely stop as fast as possible. I don't want to start a periodic timer to check this, if there is another way. Regards, Wandenberg ____________________by wandenberg - Nginx Development
Hi John, no, you don't have to change any code on nginx core, if this was your doubt.. You have to create your own module, (take a look on this page as a guide, http://www.evanmiller.org/nginx-modules-guide.html). On the "handler installation" part, instead of doing what the guide said, replace by the code I sent. On this code you are registering more one handler at access phase (pushiby wandenberg - Nginx Development
You can use an accept handler to do that. something like that ngx_http_handler_pt *h; ngx_http_core_main_conf_t *cmcf; cmcf = ngx_http_conf_get_module_main_conf(cf, ngx_http_core_module); h = ngx_array_push(&cmcf->phases.handlers); if (h == NULL) { return NGX_ERROR; } *h = your_handler_function; and in your_handler_function you record the request and return a NGX_OK, whichby wandenberg - Nginx Development
Hello! Thanks for your help. I hope that the patch be OK now. I don't know if the function and variable names are on nginx pattern. Feel free to change the patch. If you have any other point before accept it, will be a pleasure to fix it. --- src/core/ngx_slab.c 2013-05-06 07:27:10.000000000 -0300 +++ src/core/ngx_slab.c 2013-07-31 00:21:08.043034442 -0300 @@ -615,6 +615,26 @@ fail: staby wandenberg - Nginx Development
Hello! I see your point, and I will split the patch to do both actions, on ngx_slab_free_pages() and on allocation when has a failure. What would be an alternative to not loop on pool->pages? Regards, Wandenberg On Mon, Jul 29, 2013 at 2:11 PM, Maxim Dounin <mdounin@mdounin.ru> wrote: > Hello! > > On Sat, Jul 27, 2013 at 04:10:51PM -0300, Wandenberg Peixoto wrote: > >by wandenberg - Nginx Development
Hello Maxim. I've been looking into those functions and guided by your comments made the following patch to merge continuous block of memory. Can you check if it is ok? Comments are welcome. --- src/core/ngx_slab.c 2013-05-06 07:27:10.000000000 -0300 +++ src/core/ngx_slab.c 2013-07-27 15:54:55.316995223 -0300 @@ -687,6 +687,25 @@ ngx_slab_free_pages(ngx_slab_pool_t *poo page->next-by wandenberg - Nginx Development
Hi, I'm trying to understand how the shared memory pool works inside the Nginx. To do that, I made a very small module which create a shared memory zone with 2097152 bytes, and allocating and freeing blocks of memory, starting from 0 and increasing by 1kb until the allocation fails. The strange parts to me were: - the maximum block I could allocate was 128000 bytes - each time the allocation faiby wandenberg - Nginx Development
OK. thanks for the answer. On Fri, Nov 9, 2012 at 3:39 PM, Maxim Dounin <mdounin@mdounin.ru> wrote: > Hello! > > On Fri, Nov 09, 2012 at 02:33:33PM -0200, Wandenberg Peixoto wrote: > > > Hello Maxim, > > > > thanks for you explanation. > > Only one doubt, the rfc2616 on the same paragraph says > > "HTTP/1.1 clients and servers that parse theby wandenberg - Nginx Development
Hello Maxim, thanks for you explanation. Only one doubt, the rfc2616 on the same paragraph says "HTTP/1.1 clients and servers that parse the date value MUST accept all three formats (for compatibility with HTTP/1.0), though they MUST only generate the RFC 1123 http://tools.ietf.org/html/rfc1123 format for representing HTTP-date values in header fields. See section 19.3<http://tools.ietf.oby wandenberg - Nginx Development
Hello! I was checking a strange behavior when parsing dates coming from different browsers with this function and observed that it not supports dates with only one digit, it expect that the date comes with 01, 02, 03 ... But as rfc822 and rfc2822 says the day can be 1, 2 , 3, ... 10, 15, ... So I am proposing this patch to be compliant with the rfc. I expect that this patch could be applied to nby wandenberg - Nginx Development
But nginx set content type based on requested url, not on delivered file, isn't a bug. Could you change the url to /client.js ? Tthis will solve everything, you will not have to set the default_type. On Wed, Oct 24, 2012 at 9:52 AM, Tom van der Woerdt <info@tvdw.eu> wrote: > Yes, that's the URL I am using. Using default_type is possible but it > still feels like a bug, especially siby wandenberg - Nginx Development
Just to be clear, are you calling "example.com/client" and serving a js file? If yes, this is the problem, the mime types works based on requested filename extension, if I am not wrong. As you called /client the nginx don't know what mime type to deliver. So, or you have too use the default_type on that location, or change the request to something like /client.js, or do a rewrite from /cby wandenberg - Nginx Development
Are you using a mime.types file? Or setting types block? This file has a mapping from file extension to the content type, may be what is missing on your configuration. On Wed, Oct 24, 2012 at 6:59 AM, Tom van der Woerdt <info@tvdw.eu> wrote: > Thanks, that works, but it doesn't really sound like a solution, more > like a workaround. > > Tom > > > Op 10/24/12 5:04 AM,by wandenberg - Nginx Development
Try to set default_type text/javascript; instead of add_header. Regards, Wandenberg On Tue, Oct 23, 2012 at 9:50 PM, Tom van der Woerdt <info@tvdw.eu> wrote: > Hi all, > > I'm using nginx' locations to serve a javascript file on '/client' : > > location = /client { > expires epoch; > alias /path/to/a/file.js; > } > > Works fine, wby wandenberg - Nginx Development
Hi, I'm having trouble with the cache manager, it is not controlling the max_size of the cache. I have 22 workers on a 24 core server, 3 cache paths, one with 600g and other two with 200g of max_size. The cache path with 600g usually pass this value and reach 640g, as example. The files used on this server has no more than 300mb each. The other 200g cache paths don't have this problem. Do youby wandenberg - Nginx Development
Hi, I'm having trouble with the cache manager, it is not controlling the max_size of the cache. I have 22 workers on a 24 core server, 3 cache paths, one with 600g and other two with 200g of max_size. The cache path with 600g usually pass this value and reach 640g, as example. The files used on this server has no more than 300mb each. The other 200g cache paths don't have this problem. Do youby wandenberg - Nginx Mailing List - English
Hi Maxim, thanks for your response. I was hoping it had a specific function in the nginx core for that. I looked the ngx_http_set_expires function before ask to the list, but don't want to copy the code, if was possible to just call some function will be better. If don't have any other way, I will implement based on that code. Regards, Wandenberg On Thu, Apr 26, 2012 at 11:33 AM, Maxim Dounin &by wandenberg - Nginx Development