mkopylec / charon-spring-boot-starter

Reverse proxy implementation in form of a Spring Boot starter.
Apache License 2.0
240 stars 54 forks source link

socket timed out #111

Closed mkoca closed 3 years ago

mkoca commented 3 years ago

Hi; I want to use your project like a proxy. Can I set socket connection, read, write timeout value? Sometimes it throws exception like below.

Thanks..

com.github.mkopylec.charon.forwarding.RequestForwardingException: Error executing request: Read timed out at com.github.mkopylec.charon.forwarding.RequestForwardingException.requestForwardingError(RequestForwardingException.java:26) at com.github.mkopylec.charon.forwarding.interceptors.HttpRequestExecution.execute(HttpRequestExecution.java:27) at com.github.mkopylec.charon.forwarding.interceptors.rewrite.RootPathResponseCookiesRewriter.forward(RootPathResponseCookiesRewriter.java:24) at com.github.mkopylec.charon.forwarding.interceptors.HttpRequestInterceptor.intercept(HttpRequestInterceptor.java:25) at org.springframework.http.client.InterceptingClientHttpRequest$InterceptingRequestExecution.execute(InterceptingClientHttpRequest.java:93) at com.github.mkopylec.charon.forwarding.interceptors.HttpRequestExecution.execute(HttpRequestExecution.java:22) at com.github.mkopylec.charon.forwarding.interceptors.rewrite.ResponseProtocolHeadersRewriter.forward(ResponseProtocolHeadersRewriter.java:22) at com.github.mkopylec.charon.forwarding.interceptors.HttpRequestInterceptor.intercept(HttpRequestInterceptor.java:25) at org.springframework.http.client.InterceptingClientHttpRequest$InterceptingRequestExecution.execute(InterceptingClientHttpRequest.java:93) at com.github.mkopylec.charon.forwarding.interceptors.HttpRequestExecution.execute(HttpRequestExecution.java:22) at com.github.mkopylec.charon.forwarding.interceptors.rewrite.RequestServerNameRewriter.forward(RequestServerNameRewriter.java:23) at com.github.mkopylec.charon.forwarding.interceptors.HttpRequestInterceptor.intercept(HttpRequestInterceptor.java:25) at org.springframework.http.client.InterceptingClientHttpRequest$InterceptingRequestExecution.execute(InterceptingClientHttpRequest.java:93)

mkopylec commented 3 years ago

Timeouts can be set like described here: https://github.com/mkopylec/charon-spring-boot-starter/wiki/HTTP-client

mkoca commented 3 years ago

Thanks for your response. I solved my problem via your link.