<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta content="text/html;charset=UTF-8" http-equiv="Content-Type"></head><body ><div style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10pt;"><div>Dear Team,<br></div><div><br></div><div>We're using Nginx 1.22.1 open source version as Load Balancer and tomcat servers as upstream.<br><br>We got a complaint from one of our clients stating the request time is too long (~30 minutes for ~10MB uploads) from our server for few MBs of Request Upload.</div><div><br></div><div>On checking, we found the requests are reaching the upstream after this said ~30 minutes delay as checked from tomcat logs. (So slowness is not in the tomcat server)<br></div><div><br></div><div>Also, found the request body is buffered to the temporary file (<b>client_body_buffer_size 16K </b>default value is used)<br></div><div><br></div><div>We created a separate location block for this particular client URL path (say. abc.service.com/customer1/) and<br></div><div><br></div><div>We persisted the temporary client body buffer file (using the directive <b>client_body_in_file_only</b><span class="highlight" style="background-color:rgb(242, 242, 242)"><span class="colour" style="color:rgb(0, 0, 0)"><span class="font" style="font-family:monospace"><span class="size" style="font-size: medium; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; float: none;"><span> </span></span></span></span></span><code style="color: rgb(0, 0, 0); font-size: medium; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(242, 242, 242); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">on</code>) and found the ~30 minutes delay matched with the (temp buffer file last modified time - file creation time)<br></div><div><br></div><div>We assume the client is slow on the following basis,<br></div><div>1. Temporary buffer file time as said above</div><div>2. Requests of other Clients of similar requests body sizes are served faster in a few seconds.<br></div><div>3. There is no hardware issue in the Nginx server as checked from atopsar and other commands.<br></div><div><br></div><div><b>Need from Nginx Developers/community:</b><br></div><div><br></div><div>Currently, there is no straightforward way to measure the time taken by client to upload the request body. <br></div><div><br>1. A variable similar to request_time, upstream_response_time can be helpful to easily log this time taken by client.</div><div> So it will be easy to prove to the client where the slowness is.<br></div><div><br></div><div>2. Also, is there a timeout for the whole request? <br></div><div> (say request should be timed out if it is more than 15 minutes)<br></div><div><br></div><div><br></div><div class="zmail_signature_below"><div id="" data-zbluepencil-ignore="true" data-sigid="795269000000038001"><div>Thanks & Regards,<br></div><div>Devarajan D.<br></div></div></div><div><br></div></div><br></body></html>