[org.ektorp.DbAccessException: java.net.SocketTimeoutException: Read timed out]

83 views
Skip to first unread message

Mallikarjun Gurav

unread,
Jun 5, 2020, 11:11:52 AM6/5/20
to ektorp-discuss
Hi, 
I am using Ektorp API to interact with Couch database. And I am using the views to fetch the data from couch database. 
I am getting intermittent socket time out exceptions for not only GET but for POST and PUT also getting errorred out with socket time out exception. I am using load balanced environment where 2 servers interacts with individual couch databases running in 2 different VMs. The replication happens between couch VMs to reflect the same data when server requests.

Below is the sample code snippet for GET view query(by_name) for which I get socket time out exception, please note that in database around 20 documents are present but still I get exception. I have created indexes also to fetch the data across all databases(database per resource).
@GenerateView
    public List<Organisation> findByName(String name)
    {
        List<Organisation> organisations = queryView("by_name", name);

        return organisations;
    }

Socket timeout exception is getting for all kinds of operations for all databases. There is database(system_config) where only static data will be loaded upon application deployment, but I am getting exceptions for them as well, where there is no frequent operations involved for the database.

Should I get help from someone as to why these intermittent (about 40%) times getting these exceptions?

Reply all
Reply to author
Forward
0 new messages