Your application has probably run out of file descriptors. 

On linux you can get a sense of the number of active file descriptors your 
program is using by looking in the /proc/$PID/fd directory. Where $PID is 
the process id of your program.

/proc/$PID/limits will tell you the current limits for that process.

On Tuesday, 28 June 2016 14:25:56 UTC+10, dkbala...@gmail.com wrote:
>
> I am currently facing an issue in my load environment during the load 
> testing. The description of the issue is given below,
>
>
> We have a Jersey REST application which is being guarded by a GO 
> application. GO app validates the browser cookie and creates a single host 
> reverse proxy and serve the request if its a valid one, Initially we got 
> the below error 
>
> http: proxy error: dial tcp HOSTNAME:PORT can't assign requested address
>
>
> Even after upgrading it to 1.6, the same issue is happening but GO App log 
> shows the below error
> "http: proxy error: net/http: request canceled"
>
>
> I've enabled the DisableKeepAlives and performed the load testing and the 
> same issue is happening, Now Go app shows the below errors.
>
> http: proxy error: dial tcp HOSTNAME:PORT: i/o timeout
> http: proxy error: net/http: request canceled
>
>
> Code snippet for creating proxy is given below
>
>
> var proxy = httputil.NewSingleHostReverseProxy(proxy_url)
> http.DefaultTransport.(*http.Transport).DisableKeepAlives = true
>
>
> We use proxy.ServeHttp after we validate the request.  Normally the above 
> proxy error is not occurring suddenly but it occurs after 2 or 3 hours 
> after which load testing is started
>
> After disabling keep alive connection, we see lots of TCP connecion in 
> TIMED_WAIT state but its not getting closed but the application is hanging 
> and see the proxy error in the log.
>
>
> So we have to either call 
> https://golang.org/pkg/net/http/#Transport.CloseIdleConnections or 
> increase MaxIdleConnsPerHost to some higher value to fix this issue.
> The same test cases were working fine in the past but its failing now 
> suddenly.
>
> Appreciate your help.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to