SWFUpload 在上传时过早关闭连接 (nginx 499)

发布于 2024-08-19 04:47:09 字数 289 浏览 4 评论 0原文

我正在使用 swfupload 将文件上传到 nginx。它对我来说效果很好我们 99% 的用户。 然而,对于一些用户来说,上传过程中会出现某种失败。它打开了一个连接,但似乎在完成之前关闭了它 - nginx 在其访问日志中报告了 499 状态,即 NGX_HTTP_CLIENT_CLOSED_REQUEST。

我设法联系其中一位用户以获取更多信息。他们在 XP 上运行 Flash 10.0.42,并使用 Firefox 3.5.7。

有人见过这样的东西吗?关于修复它/我如何进一步调查有什么建议吗?

-乔纳森

I'm using swfupload to upload files to nginx. It works fine for me & 99% of our users.
For a couple of users, however, it fails somehow during upload. It opens a connection, but seems to close it before it's complete - nginx reports a 499 status in its access log, which is NGX_HTTP_CLIENT_CLOSED_REQUEST.

I managed to get hold of one of those users to get some more information. They're running Flash 10.0.42, on XP with Firefox 3.5.7.

Has anyone seen anything like this? Any suggestions on fixing it / how I might investigate further?

-Jonathan

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

完美的未来在梦里 2024-08-26 04:47:09

如果这里没有具体的内容,这里列出了我会询问那些无法解决问题的用户的问题。

  • 您拥有哪种类型的互联网连接?您是否位于(公司)防火墙后面?

  • 您想要上传什么类型的文件(文件类型和大小)?该文件存储在什么介质上? (例如,从 CD 上传时排除读取错误)

  • 操作系统版本、浏览器版本、Flash 版本、安装的个人防火墙和/或防病毒软件(用于检查模式)

  • 第二次尝试有效吗?

In case nothing specific comes up here, here is a list of things I would ask the users for whom it does not work out.

  • What kind of Internet connection do you have? Are you behind a (company) firewall?

  • What kind of file were you trying to upload (file type and size)? What medium was that file stored on? (To exclude read errors when uploading from CD for example)

  • OS version, Browser version, Flash version, personal firewall and/or antivirus software installed (to check for patterns)

  • Did it work on the 2nd attempt?

死开点丶别碍眼 2024-08-26 04:47:09

499错误发生在以下情况:

  • 用户成功将所有数据(包括上传文件)发送到服务器
  • 用户在获得响应之前取消请求(即通过刷新页面,所有当前请求将被取消)
  • 服务器(nginx)获取请求并成功 处理它(保存上传的文件)。下划线服务器返回 200 响应。
  • Nginx 从底层服务器获取响应,但是当想要向客户端发送响应(对于 POST 请求)时,客户端已关闭连接并消失了!因此服务器无法将响应传递给客户端。

因此,从服务器的角度来看,499 错误是上传成功!但由于客户端没有收到任何响应,nginx 将其标记为 499 错误。

The 499 error is occured when:

  • User successfully sends all data (including uploading file) to server
  • User cancels request before getting response (ie, by refreshing page, all current requests will be canceled)
  • Server (nginx) gets request and successfully process it (save uploaded file). Underlining server returns 200 response.
  • Nginx gets response from underlining server, but when wants to send response to client (for POST request), the client has closed the connection and gone! So server cannot pass response to client.

So the 499 error is a successfull upload from server's point of view! But becaue client does not received any response nginx marks it as a 499 error.

薆情海 2024-08-26 04:47:09

几种可能性,

  • 用户在上传完成之前刷新了页面。

  • 用户的互联网连接在上传过程中中断或中断。

  • 如果您使用 PHP(我猜测),请检查 php.ini 中的以下设置。

ma​​x_execution_time

如果脚本执行时间过长,服务器将根据此设置停止它。

ma​​x_file_uploads

如果用户尝试一次上传的文件数量超过此设置,则可能是这个原因。

upload_max_filesize

如果任何文件大于此设置,则不会上传该文件。这可以在客户端到达服务器之前处理:

抱歉,由于没有更具体的信息,我无法进一步缩小范围。

如果它只影响 1% 的用户,我认为这是可以接受的;) 就我个人而言,我不会浪费时间修复这 1% 的错误,除非是客户端。

A few possibilities,

  • The user refreshed the page before the upload was complete.

  • The user's internet connection cut-out or hiccuped during the upload.

  • If you're using PHP ( im guessing ) check the following settings in your php.ini.

max_execution_time

If the script takes too long to execute, the server will stop it based on this setting.

max_file_uploads

If the user tries to upload more files than this setting at once, then that might be the cause.

upload_max_filesize

If any of the files are larger than this setting, the file wont be uploaded. This can be handled before it hits the server on the client side with:

Sorry, but without more specific information, I can't narrow it down any further.

If it's only affecting 1% of your users, that's acceptable in my opinion ;) Personally I wouldn't waste time fixing a bug for the 1% unless its the client.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文