<div dir="ltr"><div>Hello,</div><div><br></div><div>I am trying to migrate from Apache2 to NGINX and having issues with SSE <br></div><div>connections. Everything else is working fine, the regular GET or POST <br></div><div>requests are getting through successfully.</div><div><br></div><div>But there are 2 critical issues with SSE connections:</div><div>1) the NGINX holds up responses until the buffer is full</div><div>2) The NGINX blocks any other requests to the server if SSE is in progress.</div><div><br></div><div>With Apache2 I used to have issue #1, but it was easily resolved with the <br></div><div>following configurations:</div><div>- <b>OutputBufferSize 0</b></div><div>The issue #2 is really blocking me from using NGINX. Why does the server block</div><div>other connections when SSE is in progress?</div><div>How to fix this issue?<br></div><div><br></div><div>The restconf application in configuration files is an HTTP/REST thin</div><div>client application that is called by the FastCGI module in the</div><div>WEB server to start a single request session for the specified user or SSE stream.<br></div><div><br></div><div>client <-> WEB server <-> restconf <-> subsystem netconf server<br></div><div></div><div><br></div><div>I am seeing that the NGINX keeps buffering my SEE output <br></div><div>regardless of my configuration settings. I tried to use the following:</div><div>- Setting <b>fastcgi_buffering off </b>in site config <b>location</b> ;</div><div>- Setting <b>fastcgi_request_buffering off </b>in site config <b>location</b> ;</div><div>- Setting header to <b>X-Accel-Buffering: no </b>in my restconf application and in the</div><div>client request.<br></div><div><br></div><div>Nothing is helping.</div><div>The strange part is that the buffering settings are not working at all.</div><div>The size of the buffer stays the same regardless off the configurations:</div><div>- fastcgi_buffer_size 4k;<br>- fastcgi_buffers 4 4k;<br>- fastcgi_busy_buffers_size 8k;</div><div><br></div><div>When I change the above setting nothing is changed in the real program run.</div><div>The <span style="color:rgb(36,39,41);font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:13px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:left;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;display:inline;float:none">whole event</span><span style="color:rgb(36,39,41);font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:13px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:left;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;display:inline;float:none"> stream waits</span> up to be sent in NGINX whether until<span style="color:rgb(36,39,41);font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:13px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:left;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;display:inline;float:none"><span> </span></span></div><div><span style="color:rgb(36,39,41);font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:13px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:left;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;display:inline;float:none">after the application finished/terminated or the buffer is full.<br></span></div><div><br></div><div>Please let me know if you would need any more information regarding this issue.</div><div><br></div><div>Thanks<br></div><div><br></div><div><br>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Anatoliy Malishevskiy<br></div>YumaWorks, Inc.<br></div></div></div></div></div></div>