Waterline orientdb database connections timing out

138 Views Asked by At

With SailsJS/Waterline I am using the waterline-orientdb adapter to connect to and commit my domain objects to OrientDB. Everything with that is fairly straightforward except for the frequent connection timeouts that I'm getting from the database.

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

It appears that oriento support database connections, is there a way to configure the adapter such that it will used a pooled database connection such that it will test the connection before issuing the query? Trying to avoid having to issue the query more than once and it seems that the adapter should be able to handle all of that under the covers itself.

1

There are 1 best solutions below

0
Dário On BEST ANSWER

Currently sails-orientdb does not support pooled connections, but it shouldn't be too difficult to implement considering PR codemix/oriento#7.

UPDATE: support for pooled connections will come in the next release of sails-orientdb: v0.10.51, and its enabled via config, example:

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

More details on PR #96.