Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Crash issue? #39

Charuru opened this Issue · 3 comments

4 participants


I have a crash issue:

        throw err;
Error: Cannot write after end
    at Gzip.write (zlib.js:316:31)
    at ServerResponse.write (/home/ubuntu/www/node_modules/express/node_modules/connect/lib/middleware/compress.js:84:18)
    at ServerResponse.end (/home/ubuntu/www/node_modules/express/node_modules/connect/lib/middleware/compress.js:89:23)
    at /home/ubuntu/www/node_modules/express/node_modules/connect/lib/middleware/session.js:256:13
    at /home/ubuntu/www/node_modules/connect-mongo/lib/connect-mongo.js:201:25
    at [object Object].<anonymous> (/home/ubuntu/www/node_modules/mongodb/lib/mongodb/collection.js:424:9)
    at [object Object].g (events.js:156:14)
    at [object Object].emit (events.js:88:20)
    at Db._callHandler (/home/ubuntu/www/node_modules/mongodb/lib/mongodb/db.js:1197:25)
    at /home/ubuntu/www/node_modules/mongodb/lib/mongodb/connection/server.js:346:30

I am using express 3. But this issue can be fixed by putting a try catch around line 201 as indicated by the debug.


Is this still an issue in the latest connect-mongo? Please try to reproduce it and close this issue if you are unable. Thanks!


hello, i have the most recent version connect-mongo@0.3.3 and i still get the error, try with try and catch fixed the problem.


I close this issue.
I can re-open it if needed.

@jdesboeufs jdesboeufs closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.