You're opening an HTTP connection to another site that is timing out. Because that site is not failing, but waiting to properly connect from code within your app, your app request never completes and request to your app now times out.
There are several things you can do to fix this:
- Fix your configuration. Perhaps you have the host/port wrong on this connection? You're hitting the wrong place and it's just hanging instead of failing
- Set a proper HTTP timeout of 10-20sec on this connection. Fail gracefully when it times out.
- Remove this code entirely, since the resource you're trying to use doesn't appear stable