简体   繁体   English

Spree Commerce 无限循环错误,难以调试

[英]Spree commerce infinity loop error that make difficult to debug

i develop my web application with spree commerce framework, that used GIT for collaboration.我使用 spree Commerce 框架开发了我的 Web 应用程序,该框架使用 GIT 进行协作。 the first thing that caused this infinity loop errors after i have pulled from develop branch that its derived in several devices so there were several devices else not derived this errors eventhough it's in the same branch, in the same project and environments.在我从它在多个设备中派生的开发分支中拉出之后,导致此无限循环错误的第一件事是,即使它在同一分支、同一项目和环境中,还有其他几个设备没有派生此错误。 In this case although this infinity errors occured, but the web still running but it's running slow and i have difficult to debug.在这种情况下,虽然发生了这个无穷大的错误,但网络仍在运行,但运行速度很慢,而且我很难调试。
i have already tried to find solution in many references but not found the solution yet.我已经尝试在许多参考资料中找到解决方案,但还没有找到解决方案。

The errors like below :错误如下:

2019-04-22 19:59:10 -0500: Listen loop error: #<Errno::EBADF: Bad file descriptor>
/Users/my_account/.rbenv/gems/ruby-2.6.1/gems/puma-3.12.1/lib/puma/server.rb:386:in `select'
/Users/my_account/.rbenv/gems/ruby-2.6.1/gems/puma-3.12.1/lib/puma/server.rb:386:in `handle_servers'
/Users/my_account/.rbenv/gems/ruby-2.6.1/gems/puma-3.12.1/lib/puma/server.rb:360:in `block in run'
2019-04-22 19:59:10 -0500: Listen loop error: #<Errno::EBADF: Bad file descriptor>
/Users/my_account/.rbenv/gems/ruby-2.6.1/gems/puma-3.12.1/lib/puma/server.rb:386:in `select'
/Users/my_account/.rbenv/gems/ruby-2.6.1/gems/puma-3.12.1/lib/puma/server.rb:386:in `handle_servers'
/Users/my_account/.rbenv/gems/ruby-2.6.1/gems/puma-3.12.1/lib/puma/server.rb:360:in `block in run'
2019-04-22 19:59:10 -0500: Listen loop error: #<Errno::EBADF: Bad file descriptor>
/Users/my_account/.rbenv/gems/ruby-2.6.1/gems/puma-3.12.1/lib/puma/server.rb:386:in `select'
/Users/my_account/.rbenv/gems/ruby-2.6.1/gems/puma-3.12.1/lib/puma/server.rb:386:in `handle_servers'
/Users/my_account/.rbenv/gems/ruby-2.6.1/gems/puma-3.12.1/lib/puma/server.rb:360:in `block in run'
2019-04-22 19:59:10 -0500: Listen loop error: #<Errno::EBADF: Bad file descriptor>

the environments that i used are : macOS mojave 10.14.4 ruby 2.6.1 rails 5.2.3 rbenv 1.1.2 spree 3.7.0我使用的环境是:macOS mojave 10.14.4 ruby​​ 2.6.1 rails 5.2.3 rbenv 1.1.2 spree 3.7.0

can anybody help ?有人可以帮忙吗? thanks before之前谢谢

I had this problem once on local environment and in my case the problem appeared when I ran puma in cluster mode.我曾经在本地环境中遇到过这个问题,在我的情况下,当我在集群模式下运行 puma 时出现了这个问题。 Single mode works fine for me.单模式对我来说很好用。

You probably have this line in your puma.rb config file: workers Integer(ENV['WEB_CONCURRENCY'] || <number>)你可能在puma.rb配置文件中有这一行: workers Integer(ENV['WEB_CONCURRENCY'] || <number>)

Try to change the <number> value to 0 and puma will run without spinning up child processes.尝试将<number>值更改为0 ,puma 将在不启动子进程的情况下运行。 Hope it will help希望它会有所帮助

UPD : solved by gem reinstallation within gemset UPD :通过在 gemset 中重新安装 gem 解决

for RVM it's:对于 RVM,它是:

  1. rvm gemset empty gemset_name rvm gemset 空 gemset_name
  2. bundle install捆绑安装

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM