-
Notifications
You must be signed in to change notification settings - Fork 256
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mongojs stop processing further find requests after 2 mins #310
Comments
Hi, we have the same problem in production! findProducts(code) {
return new Promise((resolve, reject) => {
...
products.findOne({code}, {cs: 1, code: 1, _id: 0}, (error, document) => {
if (error) {
logger.log('error', error);
reject(Boom.badData('Internal MongoDB error', error));
} else {
resolve({ code: code, relations: this.invokeXXX(document) });
}
});
}); Any suggestions? |
@niqdev I have moved to mongoose. It's due to mongojs's weak connection pool management, I guess. |
@thatisuday So, I think we will do the same or move directly to native in this case. |
@niqdev Please do that. mongoose is just super awesome. It will save you time and energy. You don't need to do separate validations. Also it provides SQL like joins. There are tons of good stuff. For overview, I have written a blog about it, please see this if you find it useful. http://gitmeet.com/post/mongoose-js-part-1-in-a-nutshell Native... Too much hardwork I guess. |
Thanks! I will have a look! |
Hi I am using mongodb version 3.0.7 and v2.4.0 of mongojs.
Above is the simplest code for fetch some data from database. It works fine for 2 mins but after that, it just doesn't return the docs. Hence http request times out with status code 502 (Bad Gateway).
I am sure their might be some sort of memory leak in here but strangely other findOne queries are working fine even after this code breaks. Console doesn't show any error when this happens.
Any idea on this one guys?
The text was updated successfully, but these errors were encountered: