Participant
January 16, 2023
Question
Getting ETIMEDOUT error when trying to use PDF Extract API in nodejs
- January 16, 2023
- 1 reply
- 908 views
Hi, i'm trying to use Adobe PDF extract api using nodejs to extract pdf text. I'm getting this weird issue of timeout error. To fix this issue i tried passing in a ClientConfig object with larger timeout but the issue still persists. Sometimes it works and sometimes doesn't. I think the ClientConfig is not applied to the code because even if it set withConnectTimeout() and withReadTimeout() to a large number like 100000000 then still the code throws error after just 10 seconds.
Here is the code -
const clientConfig = PDFServicesSdk.ClientConfig.clientConfigBuilder().withConnectTimeout(100000000).withReadTimeout(100000000).build()
const executionContext =
PDFServicesSdk.ExecutionContext.create(credentials, clientConfig);
Here is the error message -
Unexpected Error, request could not be completed Error: connect ETIMEDOUT 44.198.154.229:443
Exception encountered while executing operation Error: Unexpected error encountered while executing request Error: connect ETIMEDOUT 44.198.154.229:443
at onError (C:\web_projects\adobe-dc-pdf-services-sdk-node-samples\node_modules\@adobe\pdfservices-node-sdk\src\internal\http\http-client.js:232:9)
at ClientRequest.<anonymous> (C:\web_projects\adobe-dc-pdf-services-sdk-node-samples\node_modules\@adobe\pdfservices-node-sdk\src\internal\http\http-client.js:257:6)
at ClientRequest.emit (node:events:513:28)
at listOnTimeout (node:internal/timers:564:17)
at process.processTimers (node:internal/timers:507:7) {
requestTrackingId: undefined,
statusCode: 0,
errorCode: 'UNKNOWN'
}
2023-01-16T22:57:13.936:[ERROR]: Unexpected Error, request could not be completed Error: socket hang up
I'm not able to use adobe extract api because of this error. Someone help me.
Unexpected Error, request could not be completed Error: connect ETIMEDOUT 44.198.154.229:443
Exception encountered while executing operation Error: Unexpected error encountered while executing request Error: connect ETIMEDOUT 44.198.154.229:443
at onError (C:\web_projects\adobe-dc-pdf-services-sdk-node-samples\node_modules\@adobe\pdfservices-node-sdk\src\internal\http\http-client.js:232:9)
at ClientRequest.<anonymous> (C:\web_projects\adobe-dc-pdf-services-sdk-node-samples\node_modules\@adobe\pdfservices-node-sdk\src\internal\http\http-client.js:257:6)
at ClientRequest.emit (node:events:513:28)
at listOnTimeout (node:internal/timers:564:17)
at process.processTimers (node:internal/timers:507:7) {
requestTrackingId: undefined,
statusCode: 0,
errorCode: 'UNKNOWN'
}
2023-01-16T22:57:13.936:[ERROR]: Unexpected Error, request could not be completed Error: socket hang up
I'm not able to use adobe extract api because of this error. Someone help me.
