node-clouddrive
node-clouddrive copied to clipboard
Pool problem
I made a script that downloads about 500 files from clouddrive, each one uses a separate clouddrive download <file>
call.
The problem is that after some calls I get this:
clouddrive download -vvv /archive/aes/webpack-screencast.tgz.aes/webpack-screencast.tgz.aes.part04.rar
Loading application config...
Running command...
Initializing command...
Initializing database...
Connecting to MySQL database...
Knex:warning - Pool2 - Error: Pool was destroyed
Knex:Error Pool2 - Error: connect ECONNREFUSED 127.0.0.1:3306
Knex:Error Pool2 - Error: connect ECONNREFUSED 127.0.0.1:3306
Unhandled rejection Error: Pool was destroyed
at Pool._destroyPool (/usr/lib/node_modules/clouddrive/node_modules/pool2/lib/pool.js:548:20)
at Pool.<anonymous> (/usr/lib/node_modules/clouddrive/node_modules/pool2/lib/pool.js:465:18)
at Pool.<anonymous> (/usr/lib/node_modules/clouddrive/node_modules/pool2/lib/pool.js:505:17)
at tryCatcher (/usr/lib/node_modules/clouddrive/node_modules/bluebird/js/main/util.js:26:23)
at Promise.errorAdapter (/usr/lib/node_modules/clouddrive/node_modules/bluebird/js/main/nodeify.js:36:34)
at Promise._settlePromiseAt (/usr/lib/node_modules/clouddrive/node_modules/bluebird/js/main/promise.js:579:21)
at Promise._settlePromises (/usr/lib/node_modules/clouddrive/node_modules/bluebird/js/main/promise.js:697:14)
at Async._drainQueue (/usr/lib/node_modules/clouddrive/node_modules/bluebird/js/main/async.js:123:16)
at Async._drainQueues (/usr/lib/node_modules/clouddrive/node_modules/bluebird/js/main/async.js:133:10)
at Immediate.Async.drainQueues [as _onImmediate] (/usr/lib/node_modules/clouddrive/node_modules/bluebird/js/main/async.js:15:14)
at tryOnImmediate (timers.js:543:15)
at processImmediate [as _immediateCallback] (timers.js:523:5)
This repeats for further calls, so actually clouddrive stops working.
P.S. Node 6.2.1, Mysql 5.5, Debian Jessie.
Given the ECONNREFUSED
error, it looks like clouddrive is unable to connect to mysql given the credentials in the config. Can you double check that the host, username, and password are all accurate?
It works fine, then I leave it overnight and it dies. Not sure what's happening.
@iliakan Hey, I've made some updates and improvements which may solve your issue. If you could get the latest version (0.6.3) and give it a try, let me know if its fixed or not.