Code Monkey home page Code Monkey logo

Comments (12)

tongyao avatar tongyao commented on July 17, 2024

在bae上删掉node_modules中的mongodb文件夹试试看,请注意不要删除本地开发环境的

2013/7/24 mmtdream [email protected]

各位大神,我们的App上线了2天,现在数据连接不上,提示连接数超了,请问哪里可以设置连接数限制?还是你们平台那边才能设置呢?谢谢。


Reply to this email directly or view it on GitHubhttps://github.com//issues/30
.

from cloudajs.

mmtdream avatar mmtdream commented on July 17, 2024

谢谢回复。
但还是不行,除了刚才那个提示连接数超了以外,还多了下面的错误:
path.existsSync is now called fs.existsSync.

from cloudajs.

tongyao avatar tongyao commented on July 17, 2024

删除后请重新下线 => 上线应用

path.existsSync is now called fs.existsSync 只是个warning,可以忽略掉。

如果还不行,把提示连接数过多的日志贴给我看一下,app的地址也给我一下

from cloudajs.

mmtdream avatar mmtdream commented on July 17, 2024

已经执行了下线再上线的操作,还是一样的错误。这是App地址:http://xingmingdafen.duapp.com/
再次感谢。
ps. 下面是部分app日志:

DEBUG:2013-07-24 10:57:40xingmingdafen.duapp.com

--{ [MongoError: Connect Number Excceed] name: 'MongoError', errmsg: 'Connect Number Excceed', ok: 0 }
open

DEBUG:2013-07-24 10:57:40xingmingdafen.duapp.com

--DB auth failed
open

DEBUG:2013-07-24 10:57:40xingmingdafen.duapp.com

--========================================================================================
open

DEBUG:2013-07-24 10:57:40xingmingdafen.duapp.com

--= This message will disappear when the default safe is set on the driver Db =
open

DEBUG:2013-07-24 10:57:40xingmingdafen.duapp.com

--= =
open

DEBUG:2013-07-24 10:57:40xingmingdafen.duapp.com

--= The default of no acknowlegement will change in the very near future =
open

DEBUG:2013-07-24 10:57:40xingmingdafen.duapp.com

--= =
open

DEBUG:2013-07-24 10:57:40xingmingdafen.duapp.com

--= http://www.mongodb.org/display/DOCS/getLastError+Command =
open

DEBUG:2013-07-24 10:57:40xingmingdafen.duapp.com

--= =
open

DEBUG:2013-07-24 10:57:40xingmingdafen.duapp.com

--= ex: new Db(new Server('localhost', 27017), {safe:false}) =
open

from cloudajs.

mmtdream avatar mmtdream commented on July 17, 2024

如果我把DbCollectionHandler.js文件中的var db = new mongodb.Db('db name', server, {});的数据库名字换一个其他可用的,就可以正常工作,再换回去,就又不行了。看样子是数据库的问题。错误提示还是上面那些。

谢谢

from cloudajs.

mmtdream avatar mmtdream commented on July 17, 2024

如果用平台自带的RockMongo这个工具去打开这个数据库,也会提示连接数超了的错误,如下:
Unable to connect MongoDB, please check your configurations. MongoDB said:Failed to connect to: mongo.duapp.com:8908: Authentication failed on database 'db name' with username 'user name': Connect Number Excceed.

from cloudajs.

tongyao avatar tongyao commented on July 17, 2024

请把有问题的db名字告诉我

from cloudajs.

mmtdream avatar mmtdream commented on July 17, 2024

uxzlTqGLkTZGhALRQqUvw

from cloudajs.

tongyao avatar tongyao commented on July 17, 2024

尝试的解决方案:
打开sumeru/server/DbCollectionHandler.js 在125行左右查找poolSize的配置。

如果这个数字大于25,则改为25后重新上下线。

如果仍有问题,请再告诉我

from cloudajs.

mmtdream avatar mmtdream commented on July 17, 2024

这个已经试过了,默认就是25,然后我就改大、改小,都试过,貌似并不起作用。
我有个感觉,可能问题出在数据库服务器那边,因为:
1)对于出问题的这个库,我就是用RockMongo,都没法连上去,老是提示连接数超了;
2)我把程序中的数据库名称改为一个其他App的(已做授权处理),马上就可以正常访问,一改回去,就又不行了。
不知道我的猜测对不对,我感觉是数据库服务器那边对于连接数的设置什么的(或者类似的配置)可能达到了限制。
再次谢谢。

from cloudajs.

mmtdream avatar mmtdream commented on July 17, 2024

问题解决,感谢 tongyao

from cloudajs.

tongyao avatar tongyao commented on July 17, 2024

解决步骤
1.下线所有已有版本,新建空版本
2.删除node_modules/mongodb
3.修改sumeru/server/DbCollectionHandler.js的poolSize为10(V0.7.15以后在server_config中)
4.上传代码,上线。

from cloudajs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.