-
Notifications
You must be signed in to change notification settings - Fork 850
Description
We're using the stripe node client 8.71.0 on an AWS Lambda running node 12.x. A stripe customers.list call is called first thing when the lambda executes. 33% of the time - we get this error on that call. It consistently happens so does not seem to be transient.
I did read #650, and setting maxNetworkRetries in stripe to 2 seems to resolve the issue. However it seems that just masks the issue.
Is this a stripe issue or AWS Lambda issue? Probably lambda, I submitted a request with AWS. But putting this here in case others run into it.
2020-10-13T12:02:58.032Z c184006d-fe96-490a-9bfe-696b8271769a ERROR StripeConnectionError: An error occurred with our connection to Stripe.
at /var/task/node_modules/stripe/lib/StripeResource.js:234:9
at ClientRequest. (/var/task/node_modules/stripe/lib/StripeResource.js:489:67)
at ClientRequest.emit (events.js:315:20)
at ClientRequest.EventEmitter.emit (domain.js:483:12)
at TLSSocket.socketErrorListener (_http_client.js:426:9)
at TLSSocket.emit (events.js:315:20)
at TLSSocket.EventEmitter.emit (domain.js:483:12)
at emitErrorNT (internal/streams/destroy.js:92:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)
at processTicksAndRejections (internal/process/task_queues.js:84:21) {
type: 'StripeConnectionError',
raw: {
message: 'An error occurred with our connection to Stripe.',
detail: Error: write EPIPE
at WriteWrap.onWriteComplete [as oncomplete] (internal/stream_base_commons.js:92:16)
at writevGeneric (internal/stream_base_commons.js:132:26)
at TLSSocket.Socket._writeGeneric (net.js:784:11)
at TLSSocket.Socket._writev (net.js:793:8)
at doWrite (_stream_writable.js:401:12)
at clearBuffer (_stream_writable.js:519:5)
at TLSSocket.Writable.uncork (_stream_writable.js:338:7)
at ClientRequest.end (_http_outgoing.js:774:17)
at ClientRequest. (/var/task/node_modules/stripe/lib/StripeResource.js:506:15)
at Object.onceWrapper (events.js:422:26) {
errno: 'EPIPE',
code: 'EPIPE',
syscall: 'write'
}
},
rawType: undefined,
code: undefined,
doc_url: undefined,
param: undefined,
detail: Error: write EPIPE
at WriteWrap.onWriteComplete [as oncomplete] (internal/stream_base_commons.js:92:16)
at writevGeneric (internal/stream_base_commons.js:132:26)
at TLSSocket.Socket._writeGeneric (net.js:784:11)
at TLSSocket.Socket._writev (net.js:793:8)
at doWrite (_stream_writable.js:401:12)
at clearBuffer (_stream_writable.js:519:5)
at TLSSocket.Writable.uncork (_stream_writable.js:338:7)
at ClientRequest.end (_http_outgoing.js:774:17)
at ClientRequest. (/var/task/node_modules/stripe/lib/StripeResource.js:506:15)
at Object.onceWrapper (events.js:422:26) {
errno: 'EPIPE',
code: 'EPIPE',
syscall: 'write'
},
headers: undefined,
requestId: undefined,
statusCode: undefined,
charge: undefined,
decline_code: undefined,
payment_intent: undefined,
payment_method: undefined,
setup_intent: undefined,
source: undefined
}