Use ngx_queue_t
On Aug 23, 2016 09:41, "Raghavan, Gopal" wrote:
> I can store as ngx_rbtree_t.
> Any suggestion on how to store a struct with list of items, something like
> this in shared memory?
>
> typedef struct {
> ngx_rbtree_node_t node;
> ngx_uint_t
Hey,
I'm with a weird situation on an nginx instance.
The object on the cache was stored with 200 OK status, but sometimes when a
client request this same object nginx log something like 500 as status, HIT
as cache status, 0 bytes sent and 0 ms as response time.
Have any of you seen an error like
No, is the same way.
You may create a custom directive to set if you module is activated or not
on the location.
And check this flag as the first action of your module.
What I mean is, all requests will reach your module, but only the ones
target to the location where it is "on" will handle the req
It depends on the module. If it is configurable on main, server or location
blocks. But generally you can enable/disable at any of these 3 levels
On Jun 20, 2016 11:44, "Justin Kennedy" wrote:
> I'll try to simply the question: Can a module be enabled only for specific
> server blocks?
>
> I.e. I
Ops.
Sorry, I didn't realize that it only deals with positive numbers.
The return type as ngx_int_t tricked me, and I didn't checked the use case
as "-2".
Sorry again.
On Thu, Dec 10, 2015 at 3:01 PM, Valentin V. Bartenev
wrote:
> On Thursday 10 December 2015 14:55:32 W
Hi,
today I realized a possible problem on the ngx_atoi and ngx_atof functions
(may be on all ngx_ato* functions).
There is no way to distinguish between an error and a valid "-1" string.
For instance,
ngx_str_t some_string = ngx_string("-1");
ngx_int_t x = ngx_atoi(some_string.data, some_strin
Hi,
I would like to know what is the right way to start a new process like the
"cache manager" to execute jobs non related with directly with user
requests.
Can you help me?
Regards,
Wandenberg
___
nginx-devel mailing list
nginx-devel@nginx.org
http://
Hi Julien,
I was having the same problem with NGX_AGAIN and could solved it.
Did you fix your problem?
I can try to help you.
Regards,
Wandenberg
On Thu, Jul 18, 2013 at 1:37 AM, Julien Zefi wrote:
> Hi all,
>
> thanks for the help but after more changes and taking in count your
> suggestions
Thanks agentzh, Maxim and Igor
On Tue, Jun 3, 2014 at 11:00 AM, Maxim Dounin 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:
> >
>
ventually leading to a situation when no further allocation larger than a
> page
> size are possible from the pool. While this isn't a problem for nginx
> itself,
> it is known to be bad for various 3rd party modules. Fix is to merge
> adjacent
> blocks of free pages in the ngx_s
nin wrote:
>
> > Hello!
> >
> > On Wed, Jan 22, 2014 at 01:39:54AM -0200, Wandenberg Peixoto wrote:
> >
> > > Hello Maxim,
> > >
> > > did you have opportunity to take a look on this last patch?
> >
> > It looks more or less correct, though
Check the nginx_process_slot or nginx_process_pid
On May 13, 2014 10:20 PM, "Jordan Newman" 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@ngi
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 wrote:
> Hi,
>
>
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
wrote:
> Hello Maxim,
>
> I changed the patch to check only the p->next pointer.
> And checking if the page is in an address less
AGE)) {
I hope that now I did the right checks.
Regards,
Wandenberg
On Fri, Dec 20, 2013 at 2:49 PM, Maxim Dounin wrote:
> Hello!
>
> On Tue, Dec 17, 2013 at 09:05:16PM -0200, Wandenberg Peixoto wrote:
>
> > Hi Maxim,
> >
> > sorry for the long delay. I hope you
just tell me what can I check to be sure the next and the
previous free pages can be accessed, without problems and I will make the
changes.
Regards,
Wandenberg
On Sun, Oct 6, 2013 at 6:37 AM, Maxim Dounin wrote:
> Hello!
>
> On Wed, Jul 31, 2013 at 12:28:02AM -0300, Wandenberg
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
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 ngin
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" wrote:
> Hello guys,
>
> This is my first post to nginx-devel.
>
> First of all, I would like to
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 period
nfigured by other
modules including yours, and than execute the final handler.
Regards,
Wandenberg
On Tue, Aug 13, 2013 at 9:04 PM, Myla John-B22173 wrote:
> Hi Wandenberg Peixoto,
>
> ** **
>
> I appreciate your response.
>
> ** **
>
> I have a simp
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[NGX_HTTP_ACCESS_PHASE].handlers);
if (h == NULL) {
return NGX_E
-687,6 +720,8 @@ ngx_slab_free_pages(ngx_slab_pool_t *poo
page->next->prev = (uintptr_t) page;
pool->free.next = page;
+
+ngx_slab_merge_with_neighbour(pool, page);
}
On Tue, Jul 30, 2013 at 7:09 AM, Maxim Dounin wrote:
> Hello!
>
> On Mon, Jul 29, 2013
On Sat, Jul 27, 2013 at 04:10:51PM -0300, Wandenberg Peixoto wrote:
>
> > 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
prev & NGX_SLAB_PAGE_MASK) == NGX_SLAB_PAGE) ?
page->slab : 1;
+}
}
Regards,
Wandenberg
On Mon, Jul 1, 2013 at 8:36 AM, Maxim Dounin wrote:
> Hello!
>
> On Fri, Jun 28, 2013 at 10:36:39PM -0300, Wandenberg Peixoto wrote:
>
> > Hi,
> >
> > I'm try
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 p
25 matches
Mail list logo