ruby-on-rails - 104 : Connection reset by peer: nginx + rainbows + over 1 mb uploads

标签 ruby-on-rails nginx unicorn unix-socket rainbows

我正在运行 ThreadPool Rainbows + nginx (unix socket)

在上传大文件时,我在 nginx 错误日志中得到以下信息(应用程序日志中没有任何内容):

readv() failed (104: Connection reset by peer) while reading upstream

浏览器收到响应:
413 Request Entity Too Large

为什么会发生这种情况?
  • “client_max_body_size 80M;”在 nginx
  • 中同时在 http 和服务器级别设置(以防万一)
  • nginx 通过 unix 套接字与彩虹通信(上游套接字 + 位置 @proxy_pass)
  • 我在其他日志中看不到任何内容。我检查过:
  • 彩虹日志
  • 工头日志
  • 申请日志
  • dmesg 和/var/log/messages
  • 上传文件 ~> 1 MB 大小时会发生这种情况
  • 最佳答案

    ECONNRESET (Connection reset by peer) 错误意味着连接被后端应用程序不干净地关闭了。如果后端应用程序死亡,通常会发生这种情况,例如由于段错误,或被 OOM killer 杀死.要找出确切原因,您必须检查后端日志(如果有)和/或系统日志。

    关于ruby-on-rails - 104 : Connection reset by peer: nginx + rainbows + over 1 mb uploads,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13124412/

    相关文章:

    ruby-on-rails - 在 Rake 权限被拒绝的情况下移动文件

    php - 使用 nginx、fastcgi 和 php 设置开发环境时,我从 php 服务器获取 "Invalid request (Malformed HTTP request)"

    ruby-on-rails - 如何使rails+unicorn记录器线程安全?

    ruby-on-rails - 使用带有 remote: true 的 ajax 的 Ruby 表单会给出 ActionController::InvalidAuthenticityToken 错误。经典提交不

    html - Rails - 在表单中输入 html 时关闭 html 标签

    linux - nginx(example.app)中的自定义域无法连接

    node.js - package.json中的首页条目出现错误

    deployment - unicorn 崩溃循环

    ruby-on-rails - -苏: bundle: command not found when starting unicorn

    ruby-on-rails - 如何在 ubuntu 14.04 中知道 ruby​​ 位