> > -----Original Message----- > From: nginx-devel <nginx-devel-bounces@nginx.org> On Behalf Of Maxim Dounin > Sent: Thursday, 7 October 2021 20:17 > To: nginx-devel@nginx.org > Subject: Re: Sending a notification to the main nginx thread > > > Hello! > > In no particular order: > > - Assuming nginx uses only POSIX functions is wrong, it does use &by erankor - Nginx Development
> -----Original Message----- > From: nginx-devel <nginx-devel-bounces@nginx.org> On Behalf Of Maxim Dounin > Sent: Thursday, 7 October 2021 16:07 > To: nginx-devel@nginx.org > Subject: Re: Sending a notification to the main nginx thread > > Hello! > > To re-iterate: inside a "side thread" you are not allowed to call any non-thread-safe libc functions.by erankor - Nginx Development
> > -----Original Message----- > From: nginx-devel <nginx-devel-bounces@nginx.org> On Behalf Of Maxim Dounin > Sent: Wednesday, 6 October 2021 16:12 > To: nginx-devel@nginx.org > Subject: Re: Sending a notification to the main nginx thread > > Hello! > > First of all, you may want to take a look at this warning in the development guide: > > https://eurby erankor - Nginx Development
Hi all, I’m planning a module in which I want to send a notification from a side thread to the main nginx thread. I checked the implementation of the thread pool module, and saw that it uses ngx_notify for that. But, checking how that function is implemented (checked epoll), I saw that it can’t really be used for any other purpose… If I send my function to ngx_notify, it will overwriteby erankor - Nginx Development
Hi all, Something I bumped into today – When using the zero flag of ngx_http_compile_complex_value_t (for example, using ngx_http_set_complex_value_zero_slot) the length of the resulting string is inconsistent - 1. If the complex value is a simple string, the length does not include the null terminator. 2. If the complex value includes variables, the length includes the null terby erankor - Nginx Development
Some pitfall I stepped on a couple of times, so thought I'd share here - ngx_str_rbtree_lookup currently uses uint32_t for the hash param, however ngx_rbtree_key_t is ngx_uint_t. This means that if someone calculates a hash that is potentially int64 (e.g.. using ngx_hash_key/_lc), the nodes will not be found when looking them up the rbtree. Even though it doesn't matter for nginx core (all placesby erankor - Nginx Development
Ping Thanks Eran From: nginx-devel <nginx-devel-bounces@nginx.org> On Behalf Of Eran Kornblau Sent: Wednesday, August 19, 2020 9:02 PM To: nginx-devel@nginx.org Subject: Exposing additional stub status metrics Hi all, I want to configure Nginx to output the stub status metrics in the format used by Prometheus. My thought was to simply use the builtin 'return' directive for this, howeverby erankor - Nginx Development
Hi all, I want to configure Nginx to output the stub status metrics in the format used by Prometheus. My thought was to simply use the builtin 'return' directive for this, however, I noticed that only 4 out of the 7 metrics are currently exposed as variables. I would like to submit a patch to expose the other 3... Does this make sense? Will the patch be accepted (assuming it follows the coding sby erankor - Nginx Development
Hi Something I noticed today while looking at the code, it probably won't matter to anyone ever... But just sending for the sake of perfection :) Thanks! Eran _______________________________________________ nginx-devel mailing list nginx-devel@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx-develby erankor - Nginx Development
> Hmmm, hopefully this works because I subscribed with digest. Thank you very much for the feedback, I now had an idea of where to focus (I had a rough idea but this made it clearer). And now I know what the issue is but have no idea how to resolve it. > > My module was setting the upstream length as you suggested, hence my confusion. So I flooded the ngx_http_upstream code with debugby erankor - Nginx Development
> 2) I'm actually working on a second module/system aside from the one mentioned in my previous post. This might actually be an easier question? It's using a custom upstream (like the memcache one) to talk a binary protocol to another daemon with requests/responses. For the most part it works, but there is one oddity that I can't seem to resolve - the daemon can respond with an HTML code/heaby erankor - Nginx Development
I don’t know what you’re trying to solve… but maybe you can just send a range request relative to the end, without any custom module. For example, ‘Range: bytes=-1024’ will return the last 1k of the resource. Eran From: nginx-devel <nginx-devel-bounces@nginx.org> On Behalf Of Maksim Yevmenkin Sent: Thursday, February 13, 2020 4:49 AM To: nginx-devel@nginx.org Subject: Ngby erankor - Nginx Development
Hi all, I noticed today that I'm missing something basic... I wanted to allocate some buffers that will live throughout the lifetime of the process = not associated with any specific request. I believe I've already done something like that in the past, and I used the cycle pool for that. However, after digging a bit in the code, I found that in single process mode, if nginx is reloaded, a new cycby erankor - Nginx Development
> > Hello! > > On Mon, Jul 01, 2019 at 07:23:11PM +0000, Eran Kornblau wrote: > > > Something is unclear to me regarding the use of this function, the > > development guide says - "the functions ngx_handle_read_event(rev, > > flags) and ngx_handle_write_event(wev, lowat) must be called after handling an I/O socket notification or calling any I/O functionsby erankor - Nginx Development
Hi all, Something is unclear to me regarding the use of this function, the development guide says - "the functions ngx_handle_read_event(rev, flags) and ngx_handle_write_event(wev, lowat) must be called after handling an I/O socket notification or calling any I/O functions on that socket" If my module finished sending all the data it had, and is now waiting for more data to arrive (onby erankor - Nginx Development
Hi all, Looking at ngx_chain_writer, there's something that looks a bit off to me, this line seems redundant - https://github.com/nginx/nginx/blob/master/src/core/ngx_output_chain.c#L728 The first loop in the function adds the input chain (in) to the end of ctx->out. The second loop in the function calculates the total size of ctx->out, so it will add the size of the 'in' buffers again. Iby erankor - Nginx Development
Hi all, Does anyone happen to have some tool/script that can validate source files against nginx coding conventions? I believe some of the conventions can be fairly easy to automate (e.g. 80 chars width, spacing etc.), and was wondering whether anyone already took the time to implement something like that... Thanks! Eran _______________________________________________ nginx-devel mailing list nby erankor - Nginx Development
Thank you, Roman, this is very helpful! > In nginx source there are at least 2 examples of how to write an HTTP client: > > - OCSP stapling (src/event/ngx_event_openssl_stapling.c) > - mail_auth module (src/mail/ngx_mail_auth_http_module.c) > > Also, the HTTP proxy module does this as well, but the entire module is much more complicated. > I was familiar with the proxy modby erankor - Nginx Development
Hi all, I would like to issue HTTP requests from an nginx stream module. In my understanding, I need to use ngx_event_connect_peer to connect, and implement my own write/read event handlers in order to build the request/parse the response. Is there some other solution that takes advantage of all the code that already exists in nginx for doing that? Also, does anyone happen to have some code thatby erankor - Nginx Development
Hi all, Tried googling for this and didn't find an answer... Is it possible to force nginx to read the request body into memory (not temp file) via code? I tried request_body_in_single_buf, but it seems it only prevents the request body from being split between memory + file (probably need to update http://nginx.org/en/docs/dev/development_guide.html#http_request_body...) I guess I can accompliby erankor - Nginx Development
Hi, > Hi Eran, > > Happy to see that we are not the only place where we find open to be a problem. I took a look at your module and while the approach is sound, I decided the complexity doesn't seem to be worth it. Hope to see some numbers of how your module works at scale. > > - Ka-Hing > I don't have numbers that show the improvement we got from moving open to a thread poolby erankor - Nginx Development
Hi, > > - The code bypasses open file cache, and uses a direct call > in the http cache code instead. While it might be ok in your > setup, it looks like an incomplete solution from the generic point > of view. A better solution would be to introduce a generic > interface in ngx_open_cached_file() to allow use of thread > pools. > A small comment on this - Iby erankor - Nginx Development
> -----Original Message----- > From: nginx-devel On Behalf Of Raphael Mazelier > Sent: Tuesday, June 5, 2018 10:42 PM > To: nginx-devel@nginx.org > Subject: Problem using %V in snprintf > > Hello Ngx devs, > > I'm unsure if it the good ml for posting some question about coding nginx module. Anyway here it is. > > So I'm hacking a bit the nginx-rtmp-module (youby erankor - Nginx Development
> -----Original Message----- > From: nginx-devel On Behalf Of Ryan Burn > Sent: Friday, March 30, 2018 5:30 PM > To: nginx-devel@nginx.org; robert@cryptobells.com > Subject: Re: Restrictions to modifying request->headers_in.headers in NGX_HTTP_PREACCESS_PHASE? > > The module is intended to support distributed tracing in a pluggable way. > > The key/values of the heby erankor - Nginx Development
> -----Original Message----- > From: nginx-devel On Behalf Of Alexey Ivanov > Sent: Monday, August 14, 2017 9:25 PM > To: nginx-devel@nginx.org > Subject: Re: Add support for buffering is scripted logs > > using syslog for that particular usecase seem way more elegant, customizable, and simple. As a side bonus you won't block event loop on vfs operations (open/write/close).by erankor - Nginx Development
> > -----Original Message----- > From: nginx-devel On Behalf Of Maxim Dounin > Sent: Monday, August 14, 2017 8:34 PM > To: nginx-devel@nginx.org > Subject: Re: Add support for buffering is scripted logs > > > Ok, so is that a final 'no' for this whole feature, or is there is anything else I can do to get this feature in? > > It is certainly not a "final noby erankor - Nginx Development
> -----Original Message----- > From: nginx-devel On Behalf Of Maxim Dounin > Sent: Monday, August 14, 2017 7:55 PM > To: nginx-devel@nginx.org > Subject: Re: Add support for buffering is scripted logs > > Hello! > > On Mon, Aug 14, 2017 at 04:01:10PM +0000, Eran Kornblau wrote: > > > Thanks Maxim, comments inline. > > > > > Hello! > > &by erankor - Nginx Development
Thanks Maxim, comments inline. > Hello! > > On Mon, Aug 07, 2017 at 10:36:19AM +0000, Eran Kornblau wrote: > > Just a quick note: for me, the whole feature looks questionable, and the implementation is far from being in a commitable state. > Why questionable? you would probably agree that variables in the access log name can be useful in some cases, and you'd probablby erankor - Nginx Development
Ping Thanks Eran -----Original Message----- From: nginx-devel On Behalf Of Eran Kornblau Sent: Monday, August 7, 2017 2:09 PM To: nginx-devel@nginx.org Subject: RE: Add support for buffering in scripted logs Sorry for spamming... forgot to write - something that I know is missing in this patch is support for 'reopen files' (USR1) In order to handle that, I probably need to add an rbtree on cyby erankor - Nginx Development
Sorry for spamming... forgot to write - something that I know is missing in this patch is support for 'reopen files' (USR1) In order to handle that, I probably need to add an rbtree on cycle->open_files (the O(n) search that is currently performed in ngx_conf_open_file doesn't seem appropriate for runtime) If the general concept in the below patch is approved, I will happily submit a patch forby erankor - Nginx Development