Re: Reading large request body using ngx_http_read_client_request_body

2019-05-28 Thread NginxNewbee
Cool. Thanks a lot, Maxim. Posted at Nginx Forum: https://forum.nginx.org/read.php?2,284214,284340#msg-284340 ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx

Re: Reading large request body using ngx_http_read_client_request_body

2019-05-24 Thread NginxNewbee
Hey Maxim, Should other nginx methods like ngx_http_output_filter and ngx_http_finalize_request be used on main thread as well ? I am using ngx_http_finalize_request in the thread's completion handler already. However I was wondering if our business logic (running on thread) needs to send response

Re: Reading large request body using ngx_http_read_client_request_body

2019-05-21 Thread NginxNewbee
Maxim - Thank you so much ! Much appreciated. Posted at Nginx Forum: https://forum.nginx.org/read.php?2,284214,284246#msg-284246 ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx

Re: Reading large request body using ngx_http_read_client_request_body

2019-05-20 Thread NginxNewbee
Hey Maxim, can you please find some time to respond to my last question. We read nginx code as well on git hub but confusion remains. We would really appreciate your help on it. Thanks ! Posted at Nginx Forum: https://forum.nginx.org/read.php?2,284214,284225#msg-284225 _

Re: Reading large request body using ngx_http_read_client_request_body

2019-05-20 Thread NginxNewbee
Thanks. Your understanding is correct. For cases, when ngx_http_read_client_request_body returns NGX_AGAIN, thread returns and request will get finalized. I'll go ahead and move reading contents of r and request body to main thread in the content handler and just keep execution of our business logi

Re: Reading large request body using ngx_http_read_client_request_body

2019-05-20 Thread NginxNewbee
Thanks for your comments, Maxim. I truly appreciate it. For first comment, the reason I chose to do request processing on thread is so it wouldn't block nginx. We launch one thread per request (from content handler). There will never will be multiple threads working on a request. r is passed onto

Reading large request body using ngx_http_read_client_request_body

2019-05-18 Thread NginxNewbee
Apologies if this is a trivial question. I have searched it on web and none of the answers have solved my problem. I am trying to read request body and thing seem to work fine if request body is small (4 kb). As soon as it becomes 4+ megabytes,ngx_http_read_client_request_body returns NGX_AGAIN (-