Hey guys :wave: what's the recommended client lib...
# community-help
k
Hey guys 👋 what's the recommended client library timeout for imports? Keep seeing
Request to Node 0 failed due to " Request failed with HTTP code 524"
but I'm only importing 12K documents
f
What client library are you using?
k
f
The default timeout is 5s on the library, maybe try increasing it to something like 30 and see if that helps
k
I have it at 600 atm, so 5mins - actually I've only seen this error over the weekend but never before that for some reason
f
Could you change the log level to DEBUG and post some logs from the client library?
k
We've removed it so can't change the log level but this is what we have from aws cloudwatch
Copy code
2025-04-19T04:25:40.318Z	d04c3069-9faa-4a2c-b277-91bcb7c449f1	WARN	Request #1745036540091: Request to Node 0 failed due to " Request failed with HTTP code 524"
{"level":50,"logType":"error","time":"2025-04-19T04:25:40.424Z","platform":"linux","arch":"x64","runtime":"nodejs","runtimeVersion":"20.18.3","host":"169.254.13.49","appGroup":"catalogue","appName":"catalogue-aggregator-service/apply-typesense-schema-migrations","environment":"production","region":"eu-west-2","version":"1.23.3","appType":"AwsLambda","traceparent":"00-68cca9b2f3e4c4a6c14a9574c95da436-e09d40e80b5d6a6e-01","tracestate":"catalogue-aggregator-service/apply-typesense-schema-migrations=e09d40e80b5d6a6e","correlationId":"01JS64GXQE4Z35Z6GMX7GM5R4W","traceBreadcrumbs":"catalogue-aggregator-service/apply-typesense-schema-migrations","requestId":"01JS64GXQHQ41YMAD5D7KV2VQ0","sessionId":null,"err":{"type":"ServerError","message":"Request failed with HTTP code 524","stack":"ServerError: Request failed with HTTP code 524\n    at t.TypesenseError [as constructor] (/var/task/src/handlers/typesense/migrate.js:1:16720)\n    at new ServerError (/var/task/src/handlers/typesense/migrate.js:1:19064)\n    at e.customErrorForResponse (/var/task/src/handlers/typesense/migrate.js:12:15190)\n    at /var/task/src/handlers/typesense/migrate.js:12:11273\n    at u (/var/task/src/handlers/typesense/migrate.js:1:5211)\n    at Object.next (/var/task/src/handlers/typesense/migrate.js:1:4494)\n    at u (/var/task/src/handlers/typesense/migrate.js:1:4697)\n    at Object.next (/var/task/src/handlers/typesense/migrate.js:1:4494)\n    at fulfilled (/var/task/src/handlers/typesense/migrate.js:1:3945)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)","name":"ServerError","httpBody":null,"httpStatus":null}}
END RequestId: d04c3069-9faa-4a2c-b277-91bcb7c449f1
REPORT RequestId: d04c3069-9faa-4a2c-b277-91bcb7c449f1	Duration: 200865.83 ms	Billed Duration: 200866 ms	Memory Size: 1024 MB	Max Memory Used: 193 MB	Init Duration: 1308.30 ms
f
Are you using a wrapper on top of the client library? This could be at play here, since the error
due to
is blank
k
nope no wrapper but all goood, I'll try and work this through. Just wanted to see if there was an obvious answer
f
I dug around a bit and this seems to be related to AWS (also telling from the logs you sent)