Frequent connection errors using API from phone

David Pritchard shared this problem 10 months ago
Solved

I have an application that sends information to the Zipabox via the API from my phone. It frequently (sometimes once an hour or more) generates errors like "android.system.ErrnoException: connect failed ENETUNREACH (Network is unreachable)", "java.net.SocketTimeoutException: Failed to connect to my.zipato.com/52.49.238.44 (port 443) after 15000ms" and "java.net.SocketTimeoutException: SSL handshake timed out".


I also send information from Google App Scripts, but they don't seem to have the same problem. Why would there be this difference? I've checked the times and it's not always when I'm on public transport with bad connections. Sometimes I'm asleep, sometimes I'm in the office... I can't see a pattern to it.

Comments (3)

photo
1

Hi,

I had last year something simular. The SSL handshake is resource intensive. In my case there was another application that was absorbing quite some memory/cpu/network bandwith resulting in these timeouts. After removing that application all timeout problems were solved.

photo
1

HiI suspect that phones just have more frequent interruptions to network connections. I've reduced the problem quite a bit by just waiting for half a minute and so and retrying after each error. Also I moved the HTTP calls out of a thread (I use Llama Automate) into the main process and that seems to have helped.

photo
1

You can simply connect Phone by using the API. If your AT&T Email Not Working then please contact our best technical expert for the best solution.