afs commented on issue #3837:
URL: https://github.com/apache/jena/issues/3837#issuecomment-4207030126

   > If I understand the problem correctly, then the issue is, that 
cancellation is not forwarded to a SERVICE execution, and the requests just 
keep piling up.
   
   Yes, and there are several consequences of that!
   
   Curl is creating a connection every time (even for HTTP/2). Even if it 
closes connections, the server does not see that if it is itself waiting for 
the SERVICE.
   
   When running on the same host, HTTP/1.1, it can then run out of ports. Ports 
aren't immediately released when a connection is locally closed - the kernel 
has to clear up async later. We've seen connection exhaustion before; when the 
server is busy, the kernel does not clear up TCP connections fast enough. If 
open connections are still around, ports may be be released and there aren't 
that many ports.
   
   Coupled with interaction with services materialization, as above, ther could 
be a compounding effect.
   
   If the server is negotiating up to HTTP/2, the connection problem becomes 
head-of-line blocking and again the system can lock up.
   
   And Java does not have HTTP/3 (it's first in Java 26).
   
   > Service execution materializes the result sets before returning
   
   We could stream but that has it's own problems (broken connections).
   
   Whatever the lower level improvements are, I think we need a defensive 
request control in Fuseki to give the user some controls and have back pressure 
on high-frequency clients. e.g. Max N concurrent requests, hold up requests 
above N, and if above a higher limit M, start rejecting with HTTP 503.  Just 
queuing does not work because of resource exhaustion.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to