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

瀏覽次數:76 次
跳到第一則未讀訊息

Mallikarjun Gurav

未讀,
2020年6月5日 上午11:11:522020/6/5
收件者: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?

回覆所有人
回覆作者
轉寄
0 則新訊息