Timeout of Dwolla Transfer API Call from Google Cloud

Hi,

We run a monthly scheduled job to automatically collect payments. We run the job from Google Cloud and use nodeJS.

We are intermittently getting the following error below:

Server error FetchError: request to https://api.dwolla.com/transfers failed, reason: Client network socket disconnected before secure TLS connection was established at ClientRequest. (/workspace/node_modules/dwolla-v2/node_modules/node-fetch/lib/index.js:1491:11) at ClientRequest.emit (node:events:517:28) at ClientRequest.emit (node:domain:489:12) at TLSSocket.socketErrorListener (node:_http_client:501:9) at TLSSocket.emit (node:events:517:28) at TLSSocket.emit (node:domain:489:12) at emitErrorNT (node:internal/streams/destroy:151:8) at emitErrorCloseNT (node:internal/streams/destroy:116:3) at process.processTicksAndRejections (node:internal/process/task_queues:82:21) { type: ‘system’, errno: ‘ECONNRESET’, code: ‘ECONNRESET’ }

Initially, we ran the job ~20 transactions and 7 of them failed with the above error as above. We re-tried again, which resulted in 4 more successes and 3 more transactions with the same error. Then we tried one more time and the 3 remaining failed transactions went through.

We are unsure why we are receiving this error, why re-running the job resulted in partial, then complete fixes, and also how we can best avoid this issue in the future.

We use Dwolla’s NPM package for API communication.

Please let us know any advice you may have.

Hi @msa ,

We might need some additional information in order to debug on our end. Do you have any additional error logs or context you could share? What specific version of dwolla-v2-node are you using? What does your retry logic look like? How many requests are you sending at a time? Is the connection being closed immediately or is it hanging/timing out?

Seeing that the error is intermittent in nature, it’s likely a network issue either with your Google Cloud environment or and issue with reaching the Dwolla API for some unknown reason. Do you have firewall rules that are causing issues?

Issues like this (network related) are somewhat difficult to debug so any and all information you can share would be helpful! What I’d also recommend is trying to recreate the issue in our Sandbox environment based on the same use case you’re trying in production