无法上传乘客应用程序behing apache

无法在apache后面的乘客应用程序中上传8.4 MB文件。 通过scp传输相同的文件需要4.1分钟。

错误回溯:

[pid = 10222 file = \ text / apache2 / Hooks.cpp:727 time = 2010-05-18 07:13:14.842]:mod_passenger中出现意外错误:接收HTTP上传数据时出错:对等方重置连接(104) Backtrace:在’int Hooks :: handleRequest(request_rec *)’中的’boost :: shared_ptr Hooks :: receiveRequestBody(request_rec *,const char *)’(Hooks.cpp:1084)中(Hooks.cpp:459)

注意:用户没有取消或任何东西。 他在火狐上:-)

日志中看到的其他错误包括:

  1. [pid = 16593 file = ext / apache2 / Hooks.cpp:727 time = 2010-05-23 23:06:12.156]:mod_passenger中出现意外错误:浏览器看起来没有完成文件上传:它说它会上传6610086 \ _字节,但发送610155字节后关闭了连接。 用户可能在浏览器中单击了“停止”或他的Interne \ t连接已停止。 Backtrace:在’int Hooks :: handleRequest(request_rec *)’中的’boost :: shared_ptr Hooks :: receiveRequestBody(request_rec *,const char *)’(Hooks.cpp:1084)中(Hooks.cpp:459)

    注意:用户没有取消或任何东西。 他在IE6上:-)

  2. [pid = 28995 file = ext / apache2 / Hooks.cpp:727 time = 2010-05-17 00:40:18.697]:mod_passenger中出现意外错误:无法将数据发送到ApplicationPool服务器:write()失败:管道损坏(32)Backtrace:在’int Hooks :: handleRequest(request_rec *)中的’virtual boost :: shared_ptr Passenger :: ApplicationPoolServer :: Client :: get(const Passe \ nger :: PoolOptions&)’(ApplicationPoolServer.h:402) ‘(Hooks.cpp:523)

问题是:

  1. 为什么文件没有上传?
  2. 用于吞吐量和性能的apache文件上载的最佳实践。
  3. 我可以处理apache之外的上传,然后将其交给乘客
  4. 也试过mod_porter, http: //modporter.com,它似乎没有帮助。
  5. 乘客是否有调试模式 – 详细日志记录

PS:使用带有mod_rails的RubyOnRails在apache上, http://www.modrails.com/ ,使用ruby企业版。 在apache virtalhost中,TimeOut设置为1200。

问候,
迪帕克

如果上传610155字节需要1200秒怎么办? 这看起来非常合理。 HTTP传输通常不像scp这样的机制那么激进,并且由于HTTP在上传时效率不高,因此可能会拖得更多。

您可以尝试打开超时,如果这会对情况产生直接影响,或者记住某些客户端可能通过防火墙连接,无论出于何种原因,防火墙将连接限制为最长时间,通常为大约十分钟。

你能从类似速度的连接中复制问题吗? 或者在更大的文件上?

不幸的是,这可能是一个Safari bug。 查看此乘客错误报告:

无法上传乘客应用程序behing apache

这个古老的webkit bug报告:

https://bugs.webkit.org/show_bug.cgi?id=5760

然后指向苹果的一个无法查看或已关闭的错误报告。 我刚刚遇到了10.6.4的safari 5.0(6533.16)和乘客2.2.14的问题,所以很明显问题还没有解决。 非常令人沮丧。

解决方案是关闭vhost的keepalive。