RESTCONF Server-Sent-Event session control in nginx

Lucas JunSeong Kim 김준성 at
Tue Oct 31 06:20:43 UTC 2023

Hi, I have a question.

We have the system which the following structure is used:

Nginx <----> CGI interpreter <----> yumapro Netconf server

Multiple CGI interpreters are created and used through the settings below.

spawn-fcgi -s /var/run/fcgiwrap.socket -F 5 -- /var/www/yang-api/restconf

Nginx <----> CGI interpreter <----> yumapro Netconf server
         CGI interpreter
         CGI interpreter
         CGI interpreter
         CGI interpreter

A typical restconf set/get operation is used while appropriately load sharing through these five CGI interpreters, and when the set/get operation is completed, we can see that all used sessions are closed.
However, once a server-sent-event session is created, one CGI interpreter continues to wait in a blocking state for an event to occur from yumapro, so one CGI interpreter cannot perform other set/get operations.

In the above case, once 5 server-sent-event sessions are created, other set/get operations cannot be performed.

I wonder if there is a way to avoid this situation (for example, the request to create the 5th server-sent-event session is not allowed by nginx..)

Please let me know if you have any idea. Thanks.



The information contained in this communication from the sender is confidential. It is intended solely for use by the recipient and others authorized to receive it. If you are not the recipient, you are hereby notified that any disclosure, copying, distribution or taking action in relation of the contents of this information is strictly prohibited and may be unlawful.

This email has been scanned for viruses and malware, and may have been automatically archived by Mimecast, a leader in email security and cyber resilience. Mimecast integrates email defenses with brand protection, security awareness training, web security, compliance and other essential capabilities. Mimecast helps protect large and small organizations from malicious activity, human error and technology failure; and to lead the movement toward building a more resilient world. To find out more, visit our website.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the nginx-devel mailing list