I am working on an iOS application which works as a thin client for a bussiness server. There is a lot of requests sent to the server, a lot of data downloaded.
I don't use any fancy request frameworks, just asynchronous NSURLConnection
with a delegate.
The application usually works very well with both wifi and 3G BUT
some users report random disconnects when using 3G (in USA). All request are okey but once in a while a request fails with "Cannot Connect to Host" (-1004) error.
This affects user experience a lot.
Some facts:
- It doesn't happen on wifi
- Users report that it doesn't happen with other applications when using 3G.
- It's not a timeout issue, the error appears 0.3-1.0 secs after starting the connection.
- We were not able to reproduce the problem using traceroute.
- Using
SCNetworkReachability
the host appears to be reachable (I know the limitations of this API).
Question What could be the cause of the problem? What connection properties can differ with 3G and wifi? How can I debug it?
Currently the only solution I see is to try to send the request again if the previous request has failed. However, I would like to find the cause of the problem first.
EDIT The problem was probably caused by one of our routers. IT guys are still inspecting the problem.