Got the below Broken Pipe issue when i am trying to with Payload of size more than 4MB. Appreciate if any insight on what is wrong in my current configuration. I am still figuring out a way to send the request payload in chunks but not there yet wrt to implementation to choose.
My Current configuration is -
No Eureka, No RibbonRouting and Only SimpleHostRouting. Also I fetching the routes information from the DB store by overriding the SimpleRouteLocator methods.
Also below is additional configuration i have in my Zuul gateway -
zuul.ribbon-isolation-strategy=THREAD
zuul.host.connect-timeout-millis=30000
zuul.host.socket-timeout-millis=30000
zuul.host.max-total-connections=200
zuul.host.max-per-route-connections=50
hystrix.command.default.execution.isolation.thread.timeoutInMilliseconds=30000
java.net.SocketException: Broken pipe (Write failed)
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:111)
at java.net.SocketOutputStream.write(SocketOutputStream.java:155)
at org.apache.http.impl.io.SessionOutputBufferImpl.streamWrite(SessionOutputBufferImpl.java:124)
at org.apache.http.impl.io.SessionOutputBufferImpl.flushBuffer(SessionOutputBufferImpl.java:136)
at org.apache.http.impl.io.SessionOutputBufferImpl.write(SessionOutputBufferImpl.java:167)
at org.apache.http.impl.io.ContentLengthOutputStream.write(ContentLengthOutputStream.java:113)
at org.apache.http.entity.InputStreamEntity.writeTo(InputStreamEntity.java:144)
at org.apache.http.impl.execchain.RequestEntityProxy.writeTo(RequestEntityProxy.java:123)
at org.apache.http.impl.DefaultBHttpClientConnection.sendRequestEntity(DefaultBHttpClientConnection.java:156)
at org.apache.http.impl.conn.CPoolProxy.sendRequestEntity(CPoolProxy.java:162)
at org.apache.http.protocol.HttpRequestExecutor.doSendRequest(HttpRequestExecutor.java:238)
at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:123)
at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:271)
at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184)
at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88)
at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:117)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:55)
at org.springframework.cloud.netflix.zuul.filters.route.SimpleHostRoutingFilter.forwardRequest(SimpleHostRoutingFilter.java:364)
at org.springframework.cloud.netflix.zuul.filters.route.SimpleHostRoutingFilter.forward(SimpleHostRoutingFilter.java:290)
at org.springframework.cloud.netflix.zuul.filters.route.SimpleHostRoutingFilter.run(SimpleHostRoutingFilter.java:181)
at com.netflix.zuul.ZuulFilter.runFilter(ZuulFilter.java:112)
Comment From: spencergibb
You'll need to use the /zuul prefix. See http://cloud.spring.io/spring-cloud-static/Dalston.SR2/#_uploading_files_through_zuul
Comment From: stiyyagura
@spencergibb I thought initially i am good with this but now i am again seeing Broken pipe issue even after doing this. Just to clarify my payload is currently as a request body not as file. Kindly let me know if there is any way i can fix this.
Comment From: stiyyagura
Also some times i see
java.net.SocketException: Connection reset by peer: socket write error
Comment From: stiyyagura
@spencergibb can you please open this issue again.
Comment From: ryanjbaxter
@stiyyagura can you provide a sample that reproduces the issue?
Comment From: spencergibb
@stiyyagura did you use the /zuul path?
Comment From: ravindra-dh
Any update/workaround for this problem?
Comment From: ryanjbaxter
no we were waiting to hear back from the author
Comment From: stiyyagura
This issue is resolved as per the suggestion provided by @spencergibb
Comment From: donpaulcj
You'll need to use the
/zuulprefix. See http://cloud.spring.io/spring-cloud-static/Dalston.SR2/#_uploading_files_through_zuul
@spencergibb @stiyyagura I am not able to access this link. I am also facing the same issue intermittently.