Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

上传文件时经常超时出错 #62

Closed
felixlu opened this issue Jul 26, 2013 · 10 comments
Closed

上传文件时经常超时出错 #62

felixlu opened this issue Jul 26, 2013 · 10 comments
Labels

Comments

@felixlu
Copy link

felixlu commented Jul 26, 2013

例如,在 Redmine 中提交 Bug、并上传附件的时候,或使用 OTRS 回复邮件、并发附件的时候,提交后出现如下错误信息:

[Error] read tcp ww.xx.yy.zz:80: i/o timeout
HTTP Request POST www.abc.com:80/xxxx
Request is too large to hold in buffer, can't retry. Refresh to retry may work.
Using direct connection.
Generated by COW at Fri Jul 26 10:36:52 2013

然后看 Redmine 和 OTRS 都分别有了新的记录,附件看起来也是正常的,就是不知 OTRS 的邮件有没有发出。

@cyfdecyf
Copy link
Owner

附件大小大概在多少,什么浏览器?

错误信息中的 ww.xx.yy.zz 是局域网的机器吧?

@felixlu
Copy link
Author

felixlu commented Jul 27, 2013

附件有大有小,小的才几百 K,大的有几 M,浏览器是 Chrome,操作系统是 Mac OS X 10.8.4。
OTRS 在公网服务器上,访问的是域名,信息中的 IP 是该域名对应的实际 IP;
Redmine 在公司的异地服务器,通过 VPN 访问局域网 IP,也有绑定一个域名。

@cyfdecyf
Copy link
Owner

谢谢提供信息。目前正在修另一个 bug,搞定之后就看这个。

暂时先把你使用的服务器域名加到 direct 中,避免用 cow 访问出问题吧。

@cyfdecyf
Copy link
Owner

我今天测试了上传照片的操作,没有遇到问题。在 http://demo.redmine.org/ 上建了两个 issue 并提交附件也正常。触发问题有什么特殊的操作么?

等 8 月份有时间的话准备把 http request response 的处理放在不同的 goroutine 中,这样如果上传大文件的话可以在 header 刚发出之后就从 server 读取响应,如果 server 返回错误的话可以尽快发现。

@cyfdecyf
Copy link
Owner

另外从错误信息来看应该是 cow 从 ww.xx.yy.zz:80 读取 request body 的时候超时了,是否浏览器到 cow 的网络连接不太稳定?

@felixlu
Copy link
Author

felixlu commented Jul 30, 2013

没有什么特殊操作。cow 是装在我自己的本机,翻墙工具也是本机的 GoAgent。
我之前出现这个问题的 cow 版本应该是 0.7.2,前几天升级到了 0.7.6,今天用 Redmine 上传附件也没有重现这个问题了。不知是不是 0.7.2 才有的问题?

@cyfdecyf
Copy link
Owner

我用 0.7.2 在 Mac 上也测试了下,没有遇到问题。

如果再出现这个问题的话麻烦看下 log 吧。

@felixlu
Copy link
Author

felixlu commented Aug 1, 2013

好的,谢谢。这几天上传附件也一直没再重现了。

@felixlu felixlu closed this as completed Aug 1, 2013
@cyfdecyf
Copy link
Owner

@senluot 能给个具体的网站么?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants