开发者

iphone http request to a web server sometime very slow

I'm working on an app that makes several Http Request to a RESTFULL web server. When I lauch the app, the request is performed and very 开发者_如何学JAVAoften it timeouts. If I perform the request once again (a dedicated button is in the UI for this purpose) it's quite fast (no time out). Do you have any hints on the location of this problem ? Could it be on server side (I running a rack application on nginx / passenger), or on iphone side ? I use ASIHttpRequest, synchrone or asynchrone (depending upon the view).

Thanks a lot for you help. Regards, Luc


Seems that dns for subdomain is a know problem (at least for iPhone app). I changed the server domain to a my_domain.tld instead of subdomain.my_domain.tld and it works much better. Thanks, Luc


I'd suggest running wireshark on the server - this should show you when the iphone is sending the request to the server (or at least when the server is receiving it) and when the server replies.

If the wireshark shows the server is slow to reply then it's on the server side.

If you're still stuck after that then add the wireshark results to your question.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜