Rails cache store: how to configure redis_cache_store with password
In my environment file, I have:config.cache_store = :redis_cache_store, { url: ENV.fetch('REDIS_URL_CACHING', 'redis://localhost:6379/0')}In rails console, if I print REDIS_URL_CACHING, I get:>...
View ArticleRedis permission denied while opening dump.rdb
I am using official redis image with sidekiq on dockers.Following are yml configurations for redis image: redis: build: . dockerfile: Dockerfile-redis ports: - '6379:6379' volumes: -...
View ArticleRedis + ActionController::Live threads not dying
Background: We've built a chat feature in to one of our existing Rails applications. We're using the new ActionController::Live module and running Puma (with Nginx in production), and subscribing to...
View Articleunable to start redis-server: Job for redis-server.service failed because a...
this is the out put getting while trying to start redis-serverOct 05 12:30:18 sys-admin sudo[1398646]: pam_unix(sudo:session): session opened for user root by developer(uid=0) Oct 05 12:30:23sys-admin...
View ArticleRuby on Rails - Bulk insert of data with logging
My application is an analytics application and gets real-time data each second from several sites and all these are added inside the insights table.Currently, each data request is sent to log_insight...
View ArticleSidekiq / Ruby On Rails - Lock using Redis (Redlock) not locking correctly
I'm trying to lock a part of my code using Redis, with Redlock library.I've implemented it here:def perform(task_id, task_type) lock_manager = Redlock::Client.new([ "redis://127.0.0.1:6379" ]) lock_key...
View ArticleDocker-compose with redis, sidekiq, rails SocketError
I am perplexed about the error in my docker-compose config. I am adding redis alongside sidekiq to the existing rails app that uses docker-compose but I am failing hard on attempts to make the...
View ArticleHow do I limit REDIS memory usage with Sidekiq over time?
I am using SideKiq with Heroku Redis on a Rails 5 app. Over time, my memory utilization has grown linearly, causing me to have to upgrade my plan every month or so. My load has been relatively flat.I...
View ArticleActiveJob perform_later from inside Redis subscription block
I want to use the ruby redis client to subscribe to a channel. When subscription was successful I want to start an ActiveJob (Sidekiq is used) job using perform_later. This Job will then do some work...
View ArticleActionCable returning 0 or nil even when using redis
I'm trying to create a chatroom channel, but when I post a message, the page reloads quickly (but the content doesn't update) and in the recieved function in chatroom_channel.js I have a console.log...
View ArticleRedis caused Action Cable error and the local server was automatically shut down
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...
View ArticleSidekiq using same job id for different jobs
Brief description:For this Ruby on Rails application, I'm using sidekiq 5.2 + redis 4.1.4 for job scheduling. However, for some reason, jobs that should be different get all scheduled with the same...
View ArticleRedis went down and took our app with it. How to mitigate this in the future?
Today our Heroku hosted app had a meltdown which meant our company couldn't access or use any of our internal tools. This was worrisome to say the least.After much debugging, it turned out to be Redis...
View ArticlePassing huge JSON to Sidekiq Jobs
One of the features of the application which I am currently working on is photo upload. Customers upload photos in frontend and photos are passed to rails backed and then stored on Amazon S3.I have...
View ArticleSidekiq/Redis/Rails - Sending was working on the branch, but now will not...
Ruby version: 2.6.5Rails version: 6.1.3.1Sidekiq / Pro / Enterprise version(s): 6.2Initializer: No initializerSidekiq.yml::verbose: true:concurrency: 25:queues: - [mailers, 7] - [default, 5]Error...
View ArticleHow can I use Redis in my Ruby on Rails application with Windows OS?
First of all I am sorry for my newbie question, but I am kinda stuck here.Could anyone please tell me step by step how to use Redis in my Rails 6 application, if I have Windows OS?I have installed...
View ArticleStoring hash with top level root key in redis
I want to store a data structure like this in redis:- {"cities_arry": {"NY": ["john", "Mich", "Roh", "Dh", "Vir"],"KL": ["Big", "ching", "qull"], ... } }Is it possible
View ArticleGetting hash map result from sql query [duplicate]
I want to get a data structure like this after the sql query:-Users table has username and city. It has 10000 records {"cities_arry": {"NY": ["john", "Mich", "Roh", "Dh", "Vir"],"KL": ["Big", "ching",...
View ArticleDockerize Rails project with postgres and redis
Am new to RoR and I want to dockerize a Rails app with Redis and Postgres running in 3 different containers.I now have a simple rails project running inside a containerHow would I configure the RoR...
View ArticleReconnect with Redis after Puma fork
I am using a global variable in a rails application to store a redis client using the redis gem. In a config/initializers/redis.rb, I have$redis = Redis.new(host: "localhost", port: 6379)Then in...
View Article