Comments (3)
Was there ever a solution to this? I seem to have exactly the same setup and the same issue.
from connect-mongostore.
I don't think there was ever a solution for the module itself. In my case, I made a small middleware to make sure there is no concurrency in the session middleware for the first request.
The middleware is divided into two parts surrounding express.session() in the middleware chain. There are three stages of work: "no requests", "queue" and "normal operations". Both parts share the stage and queue variables.
The first part works as follows:
- When in "no requests", it will switch to the "queue" stage and call next().
- In the "queue" stage, the next functions passed to the this middleware is pushed into the queue but not executed.
- In "normal operations", next() is called
The second part works as follows:
- If there are queued functions, call each one emptying the queue
- Set stage to "normal operations"
- Call next()
from connect-mongostore.
Makes sense, thanks.
from connect-mongostore.
Related Issues (20)
- Question on expiring sessions from a particular API call HOT 3
- There is a small chance for a concurrency dirty read problem
- Fix for Express 4.0 HOT 2
- Is the list of servers just the seed or do you have to list every replica set member? HOT 3
- The readme mentions a callback as 2nd param but there is no callback made HOT 2
- Support for multiple hosts? HOT 2
- Server Timeouts when connecting to replica set HOT 3
- How to authenticate using authSource HOT 1
- Mongostore .set update fails with RangeError: Maximum call stack size exceeded for replica set HOT 1
- URL parser doesn't work with replica sets HOT 5
- broken for connect 3.0 + HOT 1
- SSL doesn't seem to work with replica sets HOT 2
- Existing mongoose replica set connection HOT 7
- request hangs somehow HOT 4
- Error setting TTL index on collection / Cannot determine state of server HOT 4
- How to configure db connection with autoReconnect option ? HOT 1
- TypeError: Cannot read property 'length' of undefined HOT 1
- not useful in connect 3.0+
- Cannot access ._id using mongoose HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from connect-mongostore.