无法在乘客应用程序 beh apache 中上传 [英] Not able to upload in a passenger app behing apache

查看:24
本文介绍了无法在乘客应用程序 beh apache 中上传的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法在 apache 后面的乘客应用中上传 8.4 MB 的文件.通过 scp 传输同一个文件需要 4.1 分钟.

Am not able to upload a 8.4 MB file, in a passenger app behind apache. Transferring the same file via scp took 4.1 minutes.

错误回溯:

[ pid=10222 文件=ext/apache2/Hooks.cpp:727 时间=2010-05-1807:13:14.842 ]:mod_passenger 中出现意外错误:接收时发生错误HTTP 上传数据:对等方重置连接 (104)回溯:在 'boost::shared_ptr 中Hooks::receiveRequestBody(request_rec*, const char*)' (Hooks.cpp:第1084章在'int Hooks::handleRequest(request_rec*)' (Hooks.cpp:459)

[ pid=10222 file=ext/apache2/Hooks.cpp:727 time=2010-05-18 07:13:14.842 ]: Unexpected error in mod_passenger: An error occurred while receiving HTTP upload data: Connection reset by peer (104) Backtrace: in 'boost::shared_ptr Hooks::receiveRequestBody(request_rec*, const char*)' (Hooks.cpp: 1084) in 'int Hooks::handleRequest(request_rec*)' (Hooks.cpp:459)

注意:用户没有取消或任何事情.他在使用 Firefox :-)

NOTE:user had not cancelled or anything. He was on firefox :-)

在日志中看到的其他错误是:

  1. [ pid=16593 file=ext/apache2/Hooks.cpp:727 时间=2010-05-2323:06:12.156 ]:mod_passenger 中出现意外错误:看起来浏览器没有完成文件上传:它说将上传 6610086\字节,但它在发送 610155 个字节后关闭了连接.这用户可能在浏览器或他的 Internet 中单击了停止"\t连接停滞了.回溯:在 'boost::shared_ptr 中Hooks::receiveRequestBody(request_rec*, const char*)' (Hooks.cpp:第1084章在'int Hooks::handleRequest(request_rec*)' (Hooks.cpp:459)

  1. [ pid=16593 file=ext/apache2/Hooks.cpp:727 time=2010-05-23 23:06:12.156 ]: Unexpected error in mod_passenger: It looks like the browser did not finish the file upload: it said it will upload 6610086\ bytes, but it closed the connection after sending 610155 bytes. The user probably clicked Stop in the browser or his Interne\ t connection stalled. Backtrace: in 'boost::shared_ptr Hooks::receiveRequestBody(request_rec*, const char*)' (Hooks.cpp: 1084) in 'int Hooks::handleRequest(request_rec*)' (Hooks.cpp: 459)

注意:用户没有取消或任何事情.他使用的是 IE6 :-)

NOTE:user had not cancelled or anything. He was on IE6 :-)

[ pid=28995 file=ext/apache2/Hooks.cpp:727 时间=2010-05-1700:40:18.697]:mod_passenger 中出现意外错误:无法将数据发送到ApplicationPool 服务器:write() 失败:管道损坏 (32)回溯:在'虚拟提升::shared_ptr乘客::ApplicationPoolServer::Client::get(const Passe\nger::PoolOptions&)' (ApplicationPoolServer.h:402)在'int Hooks::handleRequest(request_rec*)' (Hooks.cpp:523)

[ pid=28995 file=ext/apache2/Hooks.cpp:727 time=2010-05-17 00:40:18.697 ]: Unexpected error in mod_passenger: Could not send data to the ApplicationPool server: write() failed: Broken pipe (32) Backtrace: in 'virtual boost::shared_ptr Passenger::ApplicationPoolServer::Client::get(const Passe\ nger::PoolOptions&)' (ApplicationPoolServer.h: 402) in 'int Hooks::handleRequest(request_rec*)' (Hooks.cpp: 523)

问题是:

  1. 为什么文件没有上传?
  2. 在 apache 中上传文件以提高吞吐量和性能的最佳实践.
  3. 我可以在 apache 之外处理上传,然后将其交给乘客
  4. 也试过mod_porter,http://modporter.com,好像不行提供帮助.
  5. 乘客中是否有调试模式 - 详细日志记录

PS:在 apache 上使用通过 mod_rails 部署的 RubyOnRails,http://www.modrails.com/,使用 ruby​​ 企业版.apache virtalhost中的TimeOut设置为1200.

PS: Using RubyOnRails deployed with mod_rails on apache, http://www.modrails.com/, with ruby enterprise edition. TimeOut is set as 1200 in the apache virtalhost.

问候,
深渊

推荐答案

如果上传 610155 字节需要 1200 秒怎么办?这似乎完全合理.HTTP 传输通常不像 scp 这样的机制那么激进,并且可能会拖得更多,因为 HTTP 在上传时不是特别有效.

What if it takes 1200 seconds to upload 610155 bytes? That seems perfectly reasonable. HTTP transfers are usually not as aggressive as mechanisms like scp and can tend to drag a lot more since HTTP is not especially efficient at uploading.

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

You can try opening up your timeout, if that has a direct effect on the situation, or remember that some clients may be connected via a firewall that, for whatever reason, limits connections to a maximum amount of time, often of around ten minutes.

您能否从具有相似速度的连接中复制该问题?还是在更大的文件上?

Can you replicate the problem from a connection with a similar speed? Or on a larger file?

这篇关于无法在乘客应用程序 beh apache 中上传的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆