#community-help

Resolving Socket Timeout Exception in Typesense

TLDR Vasudev was getting a timeout error when batching data to Typesense. Kishore Nallan suggested increasing the client timeout, which Vasudev successfully did.

Powered by Struct AI
6
12mo
Solved
Join the chat
Oct 06, 2022 (12 months ago)
Vasudev
Photo of md5-591a0ac3f5f7ef9eb6e6fc35534beeae
Vasudev
08:01 AM
I am inserting data in batch of 5k, i am able to see the data in typesense but getting this error jakarta.ws.rs.ProcessingException: java.net.SocketTimeoutException: Read timed out
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
08:02 AM
Ensure that your client timeout is large enough.
Vasudev
Photo of md5-591a0ac3f5f7ef9eb6e6fc35534beeae
Vasudev
08:03 AM
nodes.add(new Node("http", "localhost", "8081"));
Configuration configuration = new Configuration(nodes, Duration.ofSeconds(2), "ABC");

Duration.ofSeconds(2) is client timeout ? 

Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
08:04 AM
Yes
Vasudev
Photo of md5-591a0ac3f5f7ef9eb6e6fc35534beeae
Vasudev
08:04 AM
okay
08:50
Vasudev
08:50 AM
i have increased timeout to integer max value