Quantcast
Channel: Active questions tagged redis+ruby-on-rails - Stack Overflow
Viewing all articles
Browse latest Browse all 873

Redis caused Action Cable error and the local server was automatically shut down

$
0
0

I have a Rails project in which the Action Cable uses Redis. The PC environment is Windows 10 + Ubuntu 18. Since I installed Docker and caused Ubuntu to fail to run normally, I removed and reinstalled Ubuntu. Since then, I have been unable to make this Rails project run on a local server (via "rails s" or "foreman s").

Since I edited "redis.service" and "sysctl.conf" several times and still failed to solve the problem of Redis can't set maximum open files, I chose to remove Redis and install it again.

After that, although the project can be activated temporarily (via "rails s" or "foreman s"), once I click on the hyperlink in the project (any web page other than Device), the server will automatically shut down. Through the log, I found that the same error message will appear 5 times before the automatic shutdown is as follows:

22:05:11 web.1     |    from /home/keaton/.rvm/gems/ruby-2.7.3/gems/actioncable-6.1.4.1/lib/action_cable/subscription_adapter/redis.rb:80:in `listen'22:05:11 web.1     |    from /home/keaton/.rvm/gems/ruby-2.7.3/gems/actioncable-6.1.4.1/lib/action_cable/subscription_adapter/redis.rb:154:in `block in ensure_listener_running'22:05:11 web.1     | /home/keaton/.rvm/rubies/ruby-2.7.3/lib/ruby/2.7.0/socket.rb:1214:in `__connect_nonblock': Operation now in progress - connect(2) would block (IO::EINPROGRESSWaitWritable)22:05:11 web.1     |    from /home/keaton/.rvm/rubies/ruby-2.7.3/lib/ruby/2.7.0/socket.rb:1214:in `connect_nonblock'

How can I solve this problem? I am a newbie who has been learning Ruby on Rails for only three months. Please help me!


Viewing all articles
Browse latest Browse all 873

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>