开发者社区> 问答> 正文

OSS上传文件大于132261字节,会超时!可能是什么原因呢~~

大家好,我在meteor中,使用cordova的插件cordova:cz.blocshop.socketsforcordova,通过OSS的API,上传wav文件。
上传的文件小于132261字节的时候,瞬间上传成功,OSS返回200。
上传的文件大于132261字节的时候,发送完文件的byte数组,OSS不返回任何数据,过一会,提示Removing socket adapter from storage. 正常的退出了。我认为是超时了,自动断开的链接。



------------------这是小于132261字节的wav,瞬间成功------------------
2015-05-09 23:38:57.748 PrayDemo2[3606:60b] file size: 56196
2015-05-09 23:38:57.803 PrayDemo2[3606:8503] Setting up connection to crying.oss-cn-hangzhou.aliyuncs.com : 80
2015-05-09 23:38:57.804 PrayDemo2[3606:8503] Resolving host: crying.oss-cn-hangzhou.aliyuncs.com
2015-05-09 23:38:58.879 PrayDemo2[3606:8503] Resolved ip: 112.124.219.91
2015-05-09 23:38:59.189 PrayDemo2[3606:60b] connected!
2015-05-09 23:38:59.190 PrayDemo2[3606:60b] strHttpHeader: PUT /audio_001.wav HTTP/1.1
Content-Length: 56196
Content-Type: audio/wav
Host: crying.oss-cn-hangzhou.aliyuncs.com
Date: Sat, 09 May 2015 15:38:57 GMT
Authorization: OSS HvB__________Jfz:6FfqJA/K9fHbgK58YqdeV7Yo3Wg=


2015-05-09 23:38:59.190 PrayDemo2[3606:60b] strHttpHeader length: 218
2015-05-09 23:38:59.190 PrayDemo2[3606:60b] bytesFile length: 56196
2015-05-09 23:38:59.191 PrayDemo2[3606:60b] all socketData length: 56414
2015-05-09 23:38:59.191 PrayDemo2[3606:60b] sent!
2015-05-09 23:38:59.661 PrayDemo2[3606:60b] Removing socket adapter from storage.
2015-05-09 23:38:59.663 PrayDemo2[3606:60b] received: HTTP/1.1 200 OK


Date: Sat, 09 May 2015 15:38:59 GMT


Content-Length: 0


Connection: close


ETag: "95EF417FE78881AF3850C6B7624412E7"


Server: AliyunOSS


x-oss-request-id: 554E2A1227A4041954201FAB







2015-05-09 23:38:59.664 PrayDemo2[3606:60b] ERROR: is hasError: false



--------------------下面是大于132261字节的wav,看上去是超时。--------------------


2015-05-09 23:16:57.123 PrayDemo2[3549:60b] file size: 324006
2015-05-09 23:16:57.363 PrayDemo2[3549:7407] Setting up connection to 192.168.1.39 : 8000
2015-05-09 23:16:57.925 PrayDemo2[3549:60b] connected!
2015-05-09 23:16:57.926 PrayDemo2[3549:60b] strHttpHeader: PUT /audio_001.wav HTTP/1.1
Content-Length: 324006
Content-Type: audio/wav
Host: 192.168.1.39
Date: Sat, 09 May 2015 15:16:57 GMT
Authorization: OSS HvB__________Jfz:/Rm9ahGzYzxkqLulsDwu/Iu77ak=


2015-05-09 23:16:57.926 PrayDemo2[3549:60b] strHttpHeader length: 196
2015-05-09 23:16:57.926 PrayDemo2[3549:60b] bytesFile length: 324006
2015-05-09 23:16:57.927 PrayDemo2[3549:60b] all socketData length: 324202
2015-05-09 23:16:57.927 PrayDemo2[3549:60b] sent!
2015-05-09 23:19:16.891 PrayDemo2[3549:60b] Removing socket adapter from storage.
2015-05-09 23:19:16.896 PrayDemo2[3549:60b] ERROR: is hasError: false




有可能是什么原因呢,我没有思路了,请大家帮助,感谢,感谢!!!

展开
收起
以利亚 2015-05-09 23:45:27 17295 0
2 条回答
写回答
取消 提交回答
  • ReOSS上传文件大于132261字节,会超时!可能是什么原因呢~~
    佩服楼主。。。自问自答也是够心酸。。
    2016-02-26 10:19:24
    赞同 展开评论 打赏
  • ReOSS上传文件大于120K,会超时!可能是什么原因呢~~
    对啦,对啦,希望OSS能出一个meteor或者cordova的SDK哦~~~

    -------------------------

    ReOSS上传文件大于120K,会超时!可能是什么原因呢~~
    思路~~思路~~

    -------------------------

    132261字节
    我又测试了好多次,找到了规律,文件尺寸大于132261字节,服务器端就不理我了。。。

    -------------------------

    ReOSS上传文件大于132261字节,会超时!可能是什么原因呢~~
    用chrome.sockets.tcp搞定了,看来是cz.blocshop.socketsforcordova的问题!
    2015-05-09 23:53:20
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
OSS运维进阶实战手册 立即下载
《OSS运维基础实战手册》 立即下载
OSS运维基础实战手册 立即下载