Welcome! Log In Create A New Profile

Advanced

Cannot disable buffering during SSE connection

All files from this thread

File Name File Size   Posted by Date  
apache_restconf.conf 2.8 KB open | download Anatoliy Malishevskiy 05/05/2021 Read message
nginx_restconf 3.5 KB open | download Anatoliy Malishevskiy 05/05/2021 Read message
nginx.conf 1.5 KB open | download Anatoliy Malishevskiy 05/05/2021 Read message
fastcgi.conf 1.1 KB open | download Anatoliy Malishevskiy 05/05/2021 Read message
Anatoliy Malishevskiy
May 05, 2021 05:26PM
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.
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Attachments:
open | download - apache_restconf.conf (2.8 KB)
open | download - nginx_restconf (3.5 KB)
open | download - nginx.conf (1.5 KB)
open | download - fastcgi.conf (1.1 KB)
Subject Author Posted

Cannot disable buffering during SSE connection Attachments

Anatoliy Malishevskiy May 05, 2021 05:26PM

Re: Cannot disable buffering during SSE connection

Maxim Dounin May 05, 2021 11:42PM

Re: Cannot disable buffering during SSE connection

Anatoliy Malishevskiy May 06, 2021 07:50PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 295
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready