Hello,
I get the following error on the second request:
Error: connect ECONNREFUSED 127.0.0.1:11211
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1161:16)
It is worth mentioning that the requests are different but they access the same user session.
Request 1:
router.get('/login',(req,res) => {
var sess = req.session;
sess.email = req.query.email;
res.send('done');
});
Request 2:
router.get('/admin',(req,res) => {
var sess = req.session;
if(sess.email) {
res.send(`Hello ${sess.email}`);
} else {
res.send('Please login first.');
}
});
My config:
const session = require("express-session");
var MemcachedStore = require('connect-memjs')(session);
...
app.use(session({
store: new MemcachedStore({
hosts: ["127.0.0.1:11211"]
}),
secret: '....',
resave: false,
saveUninitialized: false,
proxy: true,
cookie: {
maxAge: 1000 * 60 * 15
}
}));
Thanks greetings.
Hello,
I get the following error on the second request:
Error: connect ECONNREFUSED 127.0.0.1:11211
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1161:16)
It is worth mentioning that the requests are different but they access the same user session.
Request 1:
Request 2:
My config:
Thanks greetings.