Closed Zanfo96 closed 1 month ago
Did you also upgrade the Boot version of the Cloud Gateway?
Did you test with the unchanged Cloud Gateway and the updated Service A?
This indicates that the issue is likely related to how Cloud Gateway handles or forwards these larger multipart requests
This seems like a reasonable conclusion. Please open a Spring Cloud Gateway issue so that the Cloud team can investigate in the first instance. When you do so, please provide a complete yet minimal sample that reproduces the problem.
Hello,
We recently encountered an issue in our Java-Spring Boot project related to handling multipart/form-data uploads in a microservices architecture. Here’s a brief overview of our setup:
Architecture: Client → Cloud Gateway→ Service A
Cloud Gateway: A standard Spring Boot application serving as a gateway for HTTP requests, performing filtering, header modifications, and routing to specific microservices. Service A: A microservice receiving file uploads forwarded by Cloud Gateway. Problem: After upgrading to Spring Boot 3.3.4 and continuing into 3.3.5, Service A started throwing EOFException errors for larger multipart uploads (file sizes above ~250–300KB). For "large" files, the transfer encoding header is "Transfer-Encoding: chunked".
Evidence: When making the same upload request directly to Service A’s endpoint (bypassing Cloud Gateway), the upload completes successfully with no errors. This indicates that the issue is likely related to how Cloud Gateway handles or forwards these larger multipart requests.
Exception Stack Trace: Here is a portion of the stack trace from Service A:
Environment: Both the Cloud Gateway and Service A are Spring Boot applications. Only the Cloud Gateway uses Spring Cloud. Observation: The issue is specific to files uploaded via chunked transfer encoding and only occurs for file sizes exceeding a threshold (roughly 250–300KB). Could you please advise on how to resolve or troubleshoot this EOFException when handling multipart requests through Cloud Gateway in Spring Boot 3.3.4+?
Thank you!