ruby-on-rails - 机架应用程序错误处理请求 {HEAD /health } SystemStackError:堆栈级别太深
问题描述
在 puma 服务器上连续运行我的 RAILS 应用程序 3 到 5 天后,我收到以下错误:在“puma.stderr.log”文件中,这导致日志文件大小在 2 天内达到超过 100GB+
Rack app error handling request {HEAD /health }
#<SystemStackError: stack level too deep>
/.../.rvm/gems/ruby-2.3.3/gems/rack-1.5.5/lib/rack/body_proxy.rb:8:in 'respond_to?'
/.../.rvm/gems/ruby-2.3.3/gems/rack-1.5.5/lib/rack/body_proxy.rb:8:in 'respond_to?'
/.../.rvm/gems/ruby-2.3.3/gems/rack-1.5.5/lib/rack/body_proxy.rb:8:in 'respond_to?'
(~= logging this same lines for 15000 to 20000 times in log file)
/.../.rvm/gems/ruby-2.3.3/gems/rack-1.5.5/lib/rack/body_proxy.rb:8:in 'respond_to?'
/.../.rvm/gems/ruby-2.3.3/gems/rack-contrib-1.7.0/lib/rack/contrib/sendfile.rb:100:in 'call'
/.../.rvm/gems/ruby-2.3.3/gems/railties-4.0.9/lib/rails/engine.rb:511:in 'call'
/.../.rvm/gems/ruby-2.3.3/gems/railties-4.0.9/lib/rails/application.rb:97:in 'call'
/.../.rvm/gems/ruby-2.3.3/gems/puma-3.11.4/lib/puma/configuration.rb:225:in 'call'
/.../.rvm/gems/ruby-2.3.3/gems/puma-3.11.4/lib/puma/server.rb:632:in 'handle_request'
/.../.rvm/gems/ruby-2.3.3/gems/puma-3.11.4/lib/puma/server.rb:446:in 'process_client'
/.../.rvm/gems/ruby-2.3.3/gems/puma-3.11.4/lib/puma/server.rb:306:in 'block in run'
/.../.rvm/gems/ruby-2.3.3/gems/puma-3.11.4/lib/puma/thread_pool.rb:120:in 'block in spawn_thread'
我的彪马配置:
app_path = Rails.root.to_s
workers Integer( ENV['WEB_CONCURRENCY'] || 2)
threads 9,32 # Min and Max threads per worker
preload_app!
environment 'production'
port 3000
bind "unix://#{app_path}/tmp/sockets/puma.sock"
stdout_redirect "#{app_path}/log/puma/puma.stdout.log", "#{app_path}/log/puma/puma.stderr.log", false # Logging
# Set master PID and state locations
pidfile "#{app_path}/tmp/pids/puma.pid"
state_path "#{app_path}/tmp/pids/puma.state"
activate_control_app
任何人都可以帮我解决这个问题,我无法追踪确切的问题来解决这个问题?
解决方案
推荐阅读
- mpi - 在生成 MPI 进程之前检查可用的插槽/资源
- javascript - 禁用按钮仍然触发事件vue js
- javascript - 在 C# 中使用 typeahead 的自动完成功能不起作用
- python - django模板中嵌套for循环的情况下如何获取索引?
- php - 从文件中提取 SVG 标签/节点
- mongodb - 如何使用 $addToSet 成为带有对象的数组?
- android - 应用程序前的登录屏幕
- pandas - Matplotlib如何将直方图除以常数
- node.js - Electron 中的 Angular + Express.js 应用程序无法启动
- m2eclipse - 插件 org.springsource.ide.eclipse.commons.gettingstarted 无法加载类