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:
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
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?
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
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.
001117736

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.