It's hard to say what's truly causing it, but when your server goes down, you should also see NoNodeAvailableException. Also, I don't think it matters too much whether you are doing index or search requests, as all requests queue handlers (Runnable) to the generic threadpool. What is your query per second like when searching? What timeout have you set? I'm wondering if TransportClient is flooding the threadpool with a whole bunch of requests and causing your server to crash as a result. In this case though, I might also expect to see timeout exceptions as well, but since you haven't mentioned them, I'm not really sure.
For the threadpool shutdown, I typically include threadpool.shutdown() whenever I call close() since my intention is to completely shutdown the transportclient. I wouldn't suggest simply killing the threadpool only. Having said that, have you tried protecting TransportClient from handling/executing requests when NoNodeAvailableException occurs? We've set up a wrapper class around TransportClient to queue up requests until TransportClient recovers. We will periodically check to see if TransportClient can communicate with ES, and then execute the queued requests if things are back to normal. Worst case, we will drop the queued ES requests and return an error message back to the client. On Monday, January 12, 2015 at 4:38:09 AM UTC-8, Subhadip Bagui wrote: > > Hi Ed, > > I my case I have created a singleton TransportClient and querying ES with > the same in frequent interval to get data. I'm not doing any bulk > operations only searching index. threadPool needs to be shutdown once > Tomcat stops I guess, But when my webapplication is up and running is there > any need to shutdown the threadPool ? I'm getting this error recently. > Previously if the ES server goes down I used to get > NoNodeAvailableException and that's OK with me. But now the whole tomcat > goes down and no app is working showing OutOfMemoryError. Please suggest. > -- You received this message because you are subscribed to the Google Groups "elasticsearch" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/a01d7ebb-b86b-43f9-a93f-77c49b9be17f%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
