【问题标题】:Waterline orientdb database connections timing outWaterline orientdb 数据库连接超时
【发布时间】:2015-05-05 18:52:29
【问题描述】:

通过 SailsJS/Waterline,我使用 waterline-orientdb 适配器连接到我的域对象并将其提交到 OrientDB。除了我从数据库中获取的频繁连接超时之外,所有这些都相当简单。

orientdb:
{
    adapter: 'waterline-orientdb',
    host: 'somehost',
    port: 2424,
    user: 'someuser',
    password: 'somepassword',
    database: 'somedatabasename'
}

似乎 oriento 支持数据库连接,有没有办法配置适配器,使其使用池化数据库连接,以便在发出查询之前测试连接?试图避免多次发出查询,并且似乎适配器应该能够在幕后处理所有这些。

【问题讨论】:

  • Guardius,我在下面更新了我的答案,池连接将在下一个版本中出现。干杯

标签: node.js sails.js orientdb waterline sails-orientdb


【解决方案1】:

目前sails-orientdb 不支持池连接,但考虑到PR codemix/oriento#7,实现起来应该不会太难。

更新: 对池连接的支持将在sails-orientdb 的下一个版本中提供:v0.10.51,并通过配置启用,例如:

connections: {
  myLocalOrient: {
    //...
    pool: { max: 10 }
  }
}

更多详情请关注PR #96

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-10-19
    • 2013-06-20
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多