node.js - Error creating two Redis To Go clients in NodeJS on Heroku -


i've got single web dyno running on heroku app that's built using nodejs , it's using single redis go database on nano (free) tier. tier supposed support ten connections, yet if try connect in 2 different modules using:

var redis_url = require('url').parse(process.env.redistogo_url); var redis = require('redis').createclient(redis_url.port, redis_url.hostname); 

i error when trying start app:

error: ready check failed: noauth authentication required. mar 31 21:52:18 <> app/web.1: @ redisclient.on_info_cmd (/app/node_modules/redis/index.js:380:35)

the redistogo_url environment variable set correctly, , if remove code 1 of modules starts fine no errors. create 1 client , pass each module, i'd prefer understand what's causing problem here.

can explain what's going on?

i not able reproduce exact issue describe able around auth issue doing following

var redis_url = require('url').parse(process.env.redistogo_url) var redisclient1 = require('redis').createclient(redis_url.port, redis_url.hostname, {auth_pass: redis_url.auth.split(":")[1]}); redisclient1.on("ready", function(){   console.log("one ready") })  var redisclient2 = require('redis').createclient(redis_url.port, redis_url.hostname, {auth_pass: redis_url.auth.split(":")[1]}); redisclient2.on("ready", function(){   console.log("two ready") }) 

does above work you?


Comments

Popular posts from this blog

javascript - AngularJS custom datepicker directive -

javascript - jQuery date picker - Disable dates after the selection from the first date picker -