klues opened a new issue #269:
URL: https://github.com/apache/couchdb-nano/issues/269
<!--- Provide a general summary of the issue in the Title above -->
I'm using a script that should compact all my databases, looks like this:
```
const nano = require('nano')({
"url": dbUrl.trim(),
"requestDefaults": {"timeout": 250000}
});
const dblist = await nano.db.list().catch(err => console.log(err));
for (const dbName of dblist) {
try {
await nano.db.compact(dbName).catch(err => {
console.log(err);
});
} catch (e) {
console.log(e);
}
}
```
see full script at:
https://github.com/asterics/AsTeRICS-Grid/blob/master/scripts/couchDBCompact.js
## Expected Behavior
I expect the code above to:
* use a connection timeout of 250 seconds
* finish cleanly also in the case of an error since I'm catching all
exceptions/rejections
## Current Behavior
* the script works for most databases
* for some databases it fails with the following error after 60 seconds (so
my default timeout doesn't seem to work):
```
(node:84469) UnhandledPromiseRejectionWarning: Error: {error,timeout}
at responseHandler (/<path>/node_modules/nano/lib/nano.js:175:20)
at /<path>/node_modules/nano/lib/nano.js:405:13
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
```
## Steps to Reproduce (for bugs)
1. Download the script from
https://github.com/asterics/AsTeRICS-Grid/blob/master/scripts/couchDBCompact.js
2. run `node couchDBCompact.js http://admin:password@localhost:5984 compact`
with the correct credentials of a locally running CouchDB instance
## Your Environment
<!--- Include as many relevant details about the environment you experienced
the bug in -->
* Version used: nano 9.0.3
* CouchDB Version: 2.2.0
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]