In order to enable SSE feature restconf.conf file should be configured with the following parameters:

    

<IfModule mod_fcgid.c>
#
### fcgi processes configuration
#
FcgidMaxRequestsPerProcess 1000
FcgidMinProcessesPerClass 0
FcgidMaxProcesses 100
FcgidProcessLifeTime 0

#
### TimeOuts configuration
#
FcgidIdleTimeout 10

#
### Scan Intervals configuration
#
FcgidBusyScanInterval 120
FcgidErrorScanInterval 5
FcgidZombieScanInterval 5
FcgidIdleScanInterval 5
</IfModule>


<VirtualHost *:80>
 ### SET to 0!!! otherwise mod_fcgid will do it's own output buffering 
### by default it's 65536 and not 0
### MUST be set if SEE used
OutputBufferSize 0

## This is the maximum time limit for request handling.
## If a FastCGI request does not complete within BusyTimeout
## seconds, it will be subject to termination.
## Set to big number if SSE used
## NOTE: Default BusyScanInterval is 120 sec
BusyTimeout 50000

## Set to big number if SSE used
## This is the maximum period of time the module will
## wait while trying to read from or write to a FastCGI application
IPCCommTimeout 50000

## Let FastCGI to catch a Broken Pipe, if the SSE subscription
## was closed. E.g. browser or site was closed.
IdleTimeout 10

KeepAlive on
MaxKeepAliveRequests 1000
KeepAliveTimeout 10

......

    


The BusyTimeout parameter is responsible for the fcgi lingering process live time. The higher this value the longer this SSE lingering connection will live. Note, fgci timeouts have bigger priority than apache timeout. Apache timeout parameter will be ignored if there is fcgi timeout instances inside <IfModule mod_fcgid.c>.


Any time browser, web page, or any other client side application, that established SSE connection to the server, is closed - the pipe between apache server and browser will become broken. However, fcgi process will not be able to notice this unless a new notification will be sent. Meaning, the connection will be open unless a new SSE event occurred or BusyTimeout is reached whatever come first.

In order to catch broken pipe use  FcgidIdleTimeout 10 fcgi parameter.

The parameter shouldn’t have big number, so the broken connection will be advertised asap.


To extend the wait time for a request you need to change the IPCCommTimeout parameter to a large number. Otherwise URL queries may timeout before they are completed.