You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2021/09/14 09:10:37 UTC
[GitHub] [couchdb-nano] klues commented on issue #269: Unhandled Promise Rejection on timeout of nano.db.compact()
klues commented on issue #269:
URL: https://github.com/apache/couchdb-nano/issues/269#issuecomment-918964161
Thanks for testing!
After some more testing I think my problem were limited ressources on my server. While compacting I sometimes got the error `no db shards could be opened` and then like described above the node timeout error. I've experimented with increasing CouchDB params like [max_dbs_open](https://docs.couchdb.org/en/3.1.1/config/couchdb.html#couchdb/max_dbs_open) which made things even worse. Finally my solution was to simply slow down the process with an additional timeout like this:
```
await nano.db.compact(dbName).catch(err => {
console.log(err);
});
await new Promise(resolve => setTimeout(() => resolve(), 5000));
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org