【发布时间】:2015-01-11 22:09:56
【问题描述】:
我在 spree 2.3.0 的生产环境中遇到 Stack Level Too Deep 错误。
当我尝试转到管理面板中的产品图片索引页面时会发生这种情况。此错误未发生在开发中,仅在 Ninefold 上生产。当我在生产模式下本地运行应用程序时,不会发生该错误。我似乎可以追踪导致它的原因。我没有更改 Spree 中与产品图片相关的任何默认核心功能。图像在前端渲染良好。
我正在使用回形针和 aws。在某一时刻,生产没有错误。但是,我已经检查了我所有的提交并且无法确定导致此问题的更改。我添加了其他宝石,但没有任何宝石与回形针宝石或其依赖项冲突,这是我对可能导致这种情况的猜测。
这是生产日志错误。
+0000
I, [2015-01-11T22:02:28.691119 #26116] INFO -- : Processing by Spree::Admin::ImagesController#index as HTML
I, [2015-01-11T22:02:28.691252 #26116] INFO -- : Parameters: {"product_id"=>"black-string-tie-halter-top-with-printed-neck-binding"}
D, [2015-01-11T22:02:28.693443 #26116] DEBUG -- : Cache read: spree/app_configuration/redirect_https_to_http
D, [2015-01-11T22:02:28.693920 #26116] DEBUG -- : Cache read: spree/backend_configuration/locale
D, [2015-01-11T22:02:28.695806 #26116] DEBUG -- : [1m[36mSpree::Preference Load (0.7ms)[0m [1mSELECT "spree_preferences".* FROM "spree_preferences" WHERE "spree_preferences"."key" = 'spree/backend_configuration/locale' LIMIT 1[0m
D, [2015-01-11T22:02:28.695979 #26116] DEBUG -- : Cache write: spree/backend_configuration/locale
D, [2015-01-11T22:02:28.696566 #26116] DEBUG -- : Cache read: spree/app_configuration/allow_ssl_in_production
D, [2015-01-11T22:02:28.696881 #26116] DEBUG -- : Cache read: spree/app_configuration/check_for_spree_alerts
D, [2015-01-11T22:02:28.697171 #26116] DEBUG -- : Cache read: spree/app_configuration/last_check_for_spree_alerts
D, [2015-01-11T22:02:28.699099 #26116] DEBUG -- : [1m[35mSpree::User Load (0.5ms)[0m SELECT "spree_users".* FROM "spree_users" WHERE "spree_users"."id" = 1 ORDER BY "spree_users"."id" ASC LIMIT 1
D, [2015-01-11T22:02:28.702026 #26116] DEBUG -- : [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "spree_roles" INNER JOIN "spree_roles_users" ON "spree_roles"."id" = "spree_roles_users"."role_id" WHERE "spree_roles_users"."user_id" = $1 AND "spree_roles"."name" = 'admin'[0m [["user_id", 1]]
I, [2015-01-11T22:02:28.706068 #26116] INFO -- : Completed 500 Internal Server Error in 15ms
F, [2015-01-11T22:02:28.706732 #26116] FATAL -- :
SystemStackError (stack level too deep):
vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:629
任何帮助将不胜感激!
更新 - 生产环境中的全栈跟踪:
SystemStackError in Spree::Admin::ImagesController#index
stack level too deep
Rails.root: /var/www/apps/11829/releases/dbeebbeebaf8ac5fa580e0fd192ad9fc06e7ce4b
Application Trace | Framework Trace | Full Trace
vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:629
【问题讨论】:
-
堆栈跟踪不够清晰。您可以在
environments/production.rb中打开完整的堆栈跟踪并将其粘贴到此处吗? -
@kasperite 添加到问题中。没有告诉我们太多。
-
你可以在本地运行你的应用程序吗?
RAILS_ENV=production rails s? -
@RyanBigg 是的。我没有在生产中本地运行错误。
-
@RyanBigg 我在实际生产模式下部署在 Ninefold 上,我看到了错误。顺便说一句
标签: ruby-on-rails paperclip spree