Cannot disable buffering during SSE connection

Anatoliy Malishevskiy tony.malish at yumaworks.com
Wed May 5 21:24:52 UTC 2021


Hello,

I am trying to migrate from Apache2 to NGINX and having issues with SSE
connections. Everything else is working fine, the regular GET or POST
requests are getting through successfully.

But there are 2 critical issues with SSE connections:
1) the NGINX holds up responses until the buffer is full
2) The NGINX blocks any other requests to the server if SSE is in progress.

With Apache2 I used to have issue #1, but it was easily resolved with the
following configurations:
- *OutputBufferSize 0*
The issue #2 is really blocking me from using NGINX. Why does the server
block
other connections when SSE is in progress?
How to fix this issue?

The restconf application in configuration files is an HTTP/REST thin
client application that is called by the FastCGI module in the
WEB server to start a single request session for the specified user or SSE
stream.

client <-> WEB server <-> restconf <-> subsystem netconf server

I am seeing that the NGINX keeps buffering my SEE output
regardless of my configuration settings. I tried to use the following:
- Setting *fastcgi_buffering off *in site config *location* ;
- Setting *fastcgi_request_buffering off *in site config *location* ;
- Setting header to *X-Accel-Buffering: no *in my restconf application and
in the
client request.

Nothing is helping.
The strange part is that the buffering settings are not working at all.
The size of the buffer stays the same regardless off the configurations:
- fastcgi_buffer_size 4k;
- fastcgi_buffers 4 4k;
- fastcgi_busy_buffers_size 8k;

When I change the above setting nothing is changed in the real program run.
The whole event stream waits up to be sent in NGINX whether until
after the application finished/terminated or the buffer is full.

Please let me know if you would need any more information regarding this
issue.

Thanks


-- 
Anatoliy Malishevskiy
YumaWorks, Inc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20210505/45cc588f/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: apache_restconf.conf
Type: application/octet-stream
Size: 2849 bytes
Desc: not available
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20210505/45cc588f/attachment-0004.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nginx-V_log.log
Type: text/x-log
Size: 1385 bytes
Desc: not available
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20210505/45cc588f/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nginx_restconf
Type: application/octet-stream
Size: 3538 bytes
Desc: not available
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20210505/45cc588f/attachment-0005.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nginx.conf
Type: application/octet-stream
Size: 1511 bytes
Desc: not available
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20210505/45cc588f/attachment-0006.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fastcgi.conf
Type: application/octet-stream
Size: 1077 bytes
Desc: not available
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20210505/45cc588f/attachment-0007.obj>


More information about the nginx mailing list