Re: Preferred method to reopen the log with logrotate

2022-06-01 Thread Maxim Dounin
Hello! On Wed, Jun 01, 2022 at 08:07:13AM -0700, Roger Fischer wrote: > Hello, > > there seem to be two methods to tell nginx to re-open the log > file after the file was rotated (we use logrotate). > > 1) nginx -s reopen > > 2) kill -USR1 > > Which is the preferred method, and why. > > I a

Re: Buffer reuse like gzip filter module, with pre-configured number of buffers

2022-06-01 Thread hanzhai
Hi, Never mind, I figured it out by myself. The subrequest will enter the fail label which will return an NGX_ERR that caused the above-mentioned error. Thanks. Posted at Nginx Forum: https://forum.nginx.org/read.php?2,294374,294392#msg-294392 ___ ngi

Preferred method to reopen the log with logrotate

2022-06-01 Thread Roger Fischer
Hello, there seem to be two methods to tell nginx to re-open the log file after the file was rotated (we use logrotate). 1) nginx -s reopen 2) kill -USR1 Which is the preferred method, and why. I am asking because we have seen nginx -s reopen failing because of a transient issue with the con

Re: Buffer reuse like gzip filter module, with pre-configured number of buffers

2022-06-01 Thread hanzhai
Hi, I also did these in my header_filter to make sure that the modified response is sent to the client with chunked encoding. ngx_http_clear_content_length(r); ngx_http_clear_accept_ranges(r); ngx_http_clear_etag(r); ngx_table_elt_t *header_entry = ngx_list_push(&

Unknown 428 http status code description via nginx

2022-06-01 Thread libresco_27
Hello, I added 428 as an allowed http status code that can be returned from nginx. But when I access this from postman/insomnia the status code description comes out to be "unknown". eg - HTTP/1.1 428 Unknown, instead of HTTP/1.1 428 Precondition Required >From my nginx gateway, I am just returnin

Re: Buffer reuse like gzip filter module, with pre-configured number of buffers

2022-06-01 Thread hanzhai
Hi Maxim, Thanks for your reply. Your guide made me understand thoroughly the role of calling ngx_http_next_body_filter(r, NULL) in the gzip module which helped a lot. The buffer now can be reused but I still got one issue that confused me a lot. I got curl: (18) transfer closed with outstanding