SWFUpload 在上传时过早关闭连接 (nginx 499)
我正在使用 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
如果这里没有具体的内容,这里列出了我会询问那些无法解决问题的用户的问题。
您拥有哪种类型的互联网连接?您是否位于(公司)防火墙后面?
您想要上传什么类型的文件(文件类型和大小)?该文件存储在什么介质上? (例如,从 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?
499错误发生在以下情况:
因此,从服务器的角度来看,499 错误是上传成功!但由于客户端没有收到任何响应,nginx 将其标记为 499 错误。
The 499 error is occured when:
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.
几种可能性,
用户在上传完成之前刷新了页面。
用户的互联网连接在上传过程中中断或中断。
如果您使用 PHP(我猜测),请检查 php.ini 中的以下设置。
max_execution_time
如果脚本执行时间过长,服务器将根据此设置停止它。
max_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.