Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7922029
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T16:48:45+00:00 2026-06-03T16:48:45+00:00

I usually work with mongoskin because I like to be close to the database.

  • 0

I usually work with mongoskin because I like to be close to the database. Usually, I do a setup with a file like db.coffee, that contains just this:

mongo = require 'mongoskin'
# either local
module.exports = mongo.db 'mongodb://localhost/database'
# or remote
module.exports = mongo.db 'mongodb://<user>:<pass>@<host>:<port>/<db>?auto_reconnect=true'

Then I use it in my other sources:

db = require 'db'
users = db.collection 'users'
# Now use the collection in handlers and middleware

This seems to work perfectly fine when I am using a local mongo server, I’ve had an uptime for months and it never turned out to be a problem.

However, when I am using the remote second, I get problem if the server runs longer than just a few minutes – the connection to the mongodb seems lost, despite auto_reconnect. I guess this is because the localhost connection is never closed automatically.

However this led me to thinking if I am maybe using mongoskin in a wrong way, or if there’s simply a bug with the auto_reconnect?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T16:48:48+00:00Added an answer on June 3, 2026 at 4:48 pm

    ensure mongoskin is using the 1.0.0 or higher driver

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Usually I was doing something like that (just a example): using (Stream xmlStream =
I usually work with PHP but need to setup this JSP with a server
I'll preface this by saying that I usually work in C#/.Net. Normally, I use
I work on a project that takes 2-3 minuts to compile. Usually when I
Usually work in Windows, but trying to setup RabbitMQ on my Mac. Can someone
I usually work with MSSQL-Server where I can return a table-like dataset to the
I just activated the themes in my Windows XP (usually I work using the
I usually work with .NET but I have a php page that calls an
I usually work with big dataframes that are pretty well sorted (or can be
I don't usually work with this type of data layer so I'm not familiar

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.