创建/更新记录时EOF错误:轨

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了创建/更新记录时EOF错误:轨相关的知识,希望对你有一定的参考价值。

我最近偶然发现了与我的Rails应用程序的问题。我使用Ruby 2.1.0和Rails 3.2.7(我知道),最近,当我创建/更新任何任何型号的纪录,我得到的EOFError - bad content body: 错误在我的应用程序。一切似乎都在数据库级别上工作,因为如果我重装,这些变化可以看出蜜蜂(如果我创造它显示在列表视图中一个新的记录,如果我更新记录的更改都将反映)。

这里是轨道服务器的跟踪:

EOFError - bad content body:
  (gem) rack-1.4.7/lib/rack/multipart/parser.rb:83:in `block in fast_forward_to_first_boundary'
  (gem) rack-1.4.7/lib/rack/multipart/parser.rb:81:in `fast_forward_to_first_boundary'
  (gem) rack-1.4.7/lib/rack/multipart/parser.rb:17:in `parse'
  (gem) rack-1.4.7/lib/rack/multipart.rb:25:in `parse_multipart'
  (gem) rack-1.4.7/lib/rack/request.rb:336:in `parse_multipart'
  (gem) rack-1.4.7/lib/rack/request.rb:201:in `POST'
  (gem) actionpack-3.2.7/lib/action_dispatch/http/request.rb:231:in `POST'
  (gem) actionpack-3.2.7/lib/action_dispatch/http/parameters.rb:10:in `parameters'
  (gem) actionpack-3.2.7/lib/action_dispatch/http/filter_parameters.rb:33:in `filtered_parameters'
  (gem) actionpack-3.2.7/lib/action_controller/metal/instrumentation.rb:21:in `process_action'
  (gem) actionpack-3.2.7/lib/action_controller/metal/params_wrapper.rb:207:in `process_action'
  (gem) activerecord-3.2.7/lib/active_record/railties/controller_runtime.rb:18:in `process_action'
  (gem) actionpack-3.2.7/lib/abstract_controller/base.rb:121:in `process'
  (gem) actionpack-3.2.7/lib/abstract_controller/rendering.rb:45:in `process'
  (gem) actionpack-3.2.7/lib/action_controller/metal.rb:203:in `dispatch'
  (gem) actionpack-3.2.7/lib/action_controller/metal/rack_delegation.rb:14:in `dispatch'
  (gem) actionpack-3.2.7/lib/action_controller/metal.rb:246:in `block in action'
  (gem) actionpack-3.2.7/lib/action_dispatch/routing/route_set.rb:73:in `dispatch'
  (gem) actionpack-3.2.7/lib/action_dispatch/routing/route_set.rb:36:in `call'
  (gem) journey-1.0.4/lib/journey/router.rb:68:in `block in call'
  (gem) journey-1.0.4/lib/journey/router.rb:56:in `call'
  (gem) actionpack-3.2.7/lib/action_dispatch/routing/route_set.rb:600:in `call'
  (gem) omniauth-1.4.2/lib/omniauth/strategy.rb:186:in `call!'
  (gem) omniauth-1.4.2/lib/omniauth/strategy.rb:164:in `call'
  (gem) warden-1.2.1/lib/warden/manager.rb:35:in `block in call'
  (gem) warden-1.2.1/lib/warden/manager.rb:34:in `call'
  (gem) actionpack-3.2.7/lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'
  (gem) rack-1.4.7/lib/rack/etag.rb:23:in `call'
  (gem) rack-1.4.7/lib/rack/conditionalget.rb:25:in `call'
  (gem) actionpack-3.2.7/lib/action_dispatch/middleware/head.rb:14:in `call'
  (gem) actionpack-3.2.7/lib/action_dispatch/middleware/params_parser.rb:21:in `call'
  (gem) actionpack-3.2.7/lib/action_dispatch/middleware/flash.rb:242:in `call'
  (gem) rack-1.4.7/lib/rack/session/abstract/id.rb:210:in `context'
  (gem) rack-1.4.7/lib/rack/session/abstract/id.rb:205:in `call'
  (gem) actionpack-3.2.7/lib/action_dispatch/middleware/cookies.rb:338:in `call'
  (gem) activerecord-3.2.7/lib/active_record/query_cache.rb:64:in `call'
  (gem) activerecord-3.2.7/lib/active_record/connection_adapters/abstract/connection_pool.rb:473:in `call'
  (gem) actionpack-3.2.7/lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
  (gem) activesupport-3.2.7/lib/active_support/callbacks.rb:405:in `_run__451408873423695737__call__1903216192202827668__callbacks'
  (gem) activesupport-3.2.7/lib/active_support/callbacks.rb:405:in `__run_callback'
  (gem) activesupport-3.2.7/lib/active_support/callbacks.rb:385:in `_run_call_callbacks'
  (gem) activesupport-3.2.7/lib/active_support/callbacks.rb:81:in `run_callbacks'
  (gem) actionpack-3.2.7/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
  (gem) actionpack-3.2.7/lib/action_dispatch/middleware/remote_ip.rb:31:in `call'
  (gem) better_errors-0.7.2/lib/better_errors/middleware.rb:84:in `protected_app_call'
  (gem) better_errors-0.7.2/lib/better_errors/middleware.rb:79:in `better_errors_call'
  (gem) better_errors-0.7.2/lib/better_errors/middleware.rb:56:in `call'
  (gem) actionpack-3.2.7/lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'
  (gem) actionpack-3.2.7/lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
  (gem) railties-3.2.7/lib/rails/rack/logger.rb:26:in `call_app'
  (gem) railties-3.2.7/lib/rails/rack/logger.rb:16:in `call'
  (gem) actionpack-3.2.7/lib/action_dispatch/middleware/request_id.rb:22:in `call'
  (gem) rack-1.4.7/lib/rack/methodoverride.rb:21:in `call'
  (gem) rack-1.4.7/lib/rack/runtime.rb:17:in `call'
  (gem) activesupport-3.2.7/lib/active_support/cache/strategy/local_cache.rb:72:in `call'
  (gem) rack-1.4.7/lib/rack/lock.rb:15:in `call'
  (gem) actionpack-3.2.7/lib/action_dispatch/middleware/static.rb:62:in `call'
  /home/oscar/.asdf/installs/ruby/2.1.0/lib/ruby/gems/2.1.0/bundler/gems/raven-ruby-16a463b59142/lib/raven/integrations/rack.rb:54:in `call'
  (gem) railties-3.2.7/lib/rails/engine.rb:479:in `call'
  (gem) railties-3.2.7/lib/rails/application.rb:220:in `call'
  (gem) rack-1.4.7/lib/rack/content_length.rb:14:in `call'
  (gem) railties-3.2.7/lib/rails/rack/log_tailer.rb:17:in `call'
  (gem) thin-1.4.1/lib/thin/connection.rb:80:in `block in pre_process'
  (gem) thin-1.4.1/lib/thin/connection.rb:78:in `pre_process'
  (gem) thin-1.4.1/lib/thin/connection.rb:53:in `process'
  (gem) thin-1.4.1/lib/thin/connection.rb:38:in `receive_data'
  (gem) eventmachine-1.0.9.1/lib/eventmachine.rb:193:in `run'
  (gem) thin-1.4.1/lib/thin/backends/base.rb:63:in `start'
  (gem) thin-1.4.1/lib/thin/server.rb:159:in `start'
  (gem) rack-1.4.7/lib/rack/handler/thin.rb:13:in `run'
  (gem) rack-1.4.7/lib/rack/server.rb:268:in `start'
  (gem) railties-3.2.7/lib/rails/commands/server.rb:70:in `start'
  (gem) railties-3.2.7/lib/rails/commands.rb:55:in `block in <top (required)>'
  (gem) railties-3.2.7/lib/rails/commands.rb:50:in `<top (required)>'
  script/rails:6:in `<main>'

有没有人有这样的问题?

答案

这个问题可以找到here

在这个问题有一些解决问题的许多建议。它的工作对我来说,一个是这一个:

module Rack
  module Multipart
    class << self
      alias_method :original_parse_multipart, :parse_multipart
      def parse_multipart(env)
        begin
          original_parse_multipart(env)
        rescue EOFError => e 
          nil
        end
      end
    end
  end
end

因为它只是忽略了这个问题,并没有指向误差的来源,我不很喜欢。

以上是关于创建/更新记录时EOF错误:轨的主要内容,如果未能解决你的问题,请参考以下文章

通过 BPM 将音轨分割成片段,并使用 Superpowered iOS 分析每个片段

运行时错误 3021 - EOF 或 BOF 为真或当前记录已被删除

错误记录Flutter 混合开发获取 BinaryMessenger 报错 ( FlutterActivityAndFragmentDelegate.getFlutterEngine() )(代码片段

SecurityError:replaceState 无法将历史记录更新为在路径、查询或片段以外的组件中不同的 URL

学生信息管理系统EOF 和 BOF

tableview 更新错误索引路径的单元格