You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I have an AWS Redis server I set up to use for Parse Server cache and session. The setup for session and cache is shown below. My problem is that even when the server is not being called, at least a few commands are issued to the Redis server every second and a new session key is stored. After 2 days of running the server its reached 200K keys. This happens when my app is not running at all.
I wonder if I am using the wrong settings or if something else could be wrong? It would be great if someone could share with me their setup of a similar system.
System : "parse-server": "3.5.0", "connect-redis": "^3.4.1", "redis": "*"
Thanks. Cheers, Trond
var RedisCacheAdapter = require('parse-server').RedisCacheAdapter;
var Redis = require("ioredis");
var RedisStore = require('connect-redis')(session);
var redisOptions = {url: process.env.REDIS_URL};
var redisCache = new RedisCacheAdapter(redisOptions)
var redisiosClient = new Redis(process.env.REDIS_URL);
app.set('trust proxy', 1);
app.enable('trust proxy');
app.use(session({
name:'sessions',
secret: process.env.COOKIE_SESSION_SECRET,
proxy: true,
resave: false,
saveUninitialized: false,
store: new RedisStore({
client:redisiosClient,
ttl: 7 * 24 * 60 * 60
})
}));
The text was updated successfully, but these errors were encountered:
I think this issue is not related to Parse Server. You might want to ask some help in connect-redis repository. Anyway, here it goes my piece of help: Do you have some health check running time by time? Perhaps in an AWS Load Balancer? It seems that you have something hitting your servers and opening new sessions regularly.
@davimacedo Thanks for your help on this. The problem was solved by using sticky session and the number of operations explained by AWS load balancer doing periodic checking.
Hi, I have an AWS Redis server I set up to use for Parse Server cache and session. The setup for session and cache is shown below. My problem is that even when the server is not being called, at least a few commands are issued to the Redis server every second and a new session key is stored. After 2 days of running the server its reached 200K keys. This happens when my app is not running at all.
I wonder if I am using the wrong settings or if something else could be wrong? It would be great if someone could share with me their setup of a similar system.
System : "parse-server": "3.5.0", "connect-redis": "^3.4.1", "redis": "*"
Thanks. Cheers, Trond
The text was updated successfully, but these errors were encountered: