If the remote NiFi instance slows down for some reason, and S2S requests have been timed out continuously, those timed out requests will remain in the internal request queue at StandardRootGroupPort.
Once number of queued requests becomes 1,000, newly received request can not be offered to the queue, and RequestExpiredException is thrown. A S2S client receives following error in this case:
2017-09-11 16:32:38,137 ERROR [Timer-Driven Process Thread-4] o.a.nifi.remote.StandardRemoteGroupPort RemoteGroupPort[name=output,target=http:<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<title>Error 500 Server Error</title>
<body><h2>HTTP ERROR 500</h2>
<p>Problem accessing /nifi-api/data-transfer/output-ports/6fc7fa6d-015e-1000-27cb-d118b1b0fe13/transactions/73da9bcf-87ec-4594-8e45-a41965c1ed82/flow-files. Reason:
<pre> Server Error</pre></p><h3>Caused by:</h3><pre>java.io.IOException: Failed to process the request.
Once a NiFi instance owning the root group port enters this state, it will not be able to recover automatically as its client keeps retrying too often. And the returned error message is not clear to understand what is happening.
The remote NiFi instance should remove already expired requests from its internal queue, so that newly received requests are processed correctly, and return 'read timeout' error response if it can not be processed and expired.