Loading

HTTP Connector | HTTP response stream was closed before being read but response streams must always be consumed

Data pubblicazione: Jan 20, 2025
Risoluzione

SYMPTOM

When using HTTP Request to call an HTTP endpoint, the following log message is seen:

HTTP response stream was closed before being read but response streams must always be consumed.

This issue can arise due to two different causes, each with its own appropriate solution, as listed below:

CAUSE 1 (Latency)

The HTTP endpoint being called has a latency of 20 seconds or more between sending back two adjacent chunks of the HTTP response being streamed.
This can be confirmed by collecting tcpdump: How to Debug SSL/TLS Traffic Using jSSLKeyLog, TCPDUMP and Wireshark

SOLUTION

To resolve the issue, you have the following options:

Option 1: Fix the latency issue of the remote endpoint

Option 2: Increase the read timeout of HTTP response streaming by setting the system property "mule.http.responseStreaming.pipeReadTimeoutMillis".
Refer to How can I set Mule and Java system properties at startup?

CAUSE 2 (January 2025 Mule Runtime patch update)

The issue began occurring after the below January 2025 Mule Runtime patch was applied to the Mule 4 CloudHub applications. Prior to this, the applications were functioning correctly with the December 2024 patch.

4.4.0 (Jan 7, 2025)

4.6.10

4.8.2

SOLUTION

To resolve the issue, you have the following options:

Option 1: The fix is available in the latest Mule Runtime patch versions below and this can be updated from the CloudHub Application settings page.

4.4.0 (Jan 17, 2025)

4.6.11

4.8.3

Option 2: If there are issues applying the latest patch, you can use the workaround of disabling "stream response" for HTTP requests if your requests does not require streaming.

Numero articolo Knowledge

001117736

 
Caricamento
Salesforce Help | Article