iPad 上的 ASIHTTPRequest:“请求超时”
我的应用程序允许用户从我自己的专用服务器下载相对较大的文件(~120 MB)。我使用 ASIHTTPRequest 库进行下载。
听起来可能很奇怪,但直到昨天一切都正常。我已经无数次尝试从我的应用程序(在 iPad 上)和 Mac 上下载文件,在 Mac 上下载成功,但在 iPad 上却随机超时。有时它会达到 100%,有时会达到 30%-40% 或其他,然后 ASIHTTPRequest 的 downloadFailed:
选择器被调用。如果我打印出错误的 localizedDescription
,我会收到“请求超时”。
这意味着什么?会不会是我的应用程序的问题?或者我的服务器或我的连接有问题?我意识到这可能取决于几个因素,因此如有必要,请向我询问您需要的任何信息。谢谢。
My application allows the user to download relatively large files (~120 MB) from my own dedicated server. I'm using the ASIHTTPRequest library for downloading.
It may sound weird, but everything worked fine until yesterday. I've tried downloading files countless times both from my app (on an iPad) and a Mac, and while on the Mac the download succeeds, on the iPad it randomly times out. Sometimes it goes until 100%, sometimes it reaches 30%-40% or something and then ASIHTTPRequest's downloadFailed:
selector gets called. If I print out the error's localizedDescription
, I get "The request timed out".
What could this mean? Could it be a problem of my app? Or a problem with my server, or my connection? I realize this could depend on several factors, so please ask me any information you need if necessary. Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我遇到了奇怪的网络情况,例如升级到 4.2 后开始使用 Wi-Fi 时,我的 iPad 超时,但这种情况是间歇性的。
转到设置 ->一般->重置网络设置,然后重新输入 wifi 设置为我解决了这个问题。
(还要检查是否有人最近没有在与您的网络相同的信道上设置新的附近 WiFi 接入点!)
I had weird network situations like timeouts on my ipad when using wifi that started after the upgrade to 4.2, but were intermittent.
Going to Settings -> General -> Reset Network settings and then reentering the wifi settings solved it for me.
(Also check that someone hasn't recently setup a new nearby wifi access point on the same channel as your network!)
你们的服务器对连接数有限制吗?我遇到了一个问题,因为连接数太多,然后服务器拒绝了这些连接。然后,他们就超时了。
Does your server have limit about the number of connections ? I encountered a problem because the number of connections are too much, then the server declines those connections. Then, they are time out.
您使用 WiFi 还是 3G 连接?非 WiFi 连接仅允许下载最大大小为 20Mb 的文件。
Do you use WiFi or 3G connection? Non-WiFi connection allows to download files with maximum size of 20Mb only.