Elastic search and tomcat integration thread issue

I need some help and it is urgent...

I have created a war which invokes index and search on elasticsearch and deployed in Tomcat 6.x. But I am keep getting

"org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/test] appears to have started a thread named [elasticsearch[sample][riverClusterService#updateTask][T#1]] but has failed to stop it. This is very likely to create a memory leak."

and sometimes
"The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact.
java.lang.IllegalStateException at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1566)"

All http requests are passed through a servlet in the war where I do some transformations after that it invokes TransportClient and uses IndexRequest, UpdateRequest etc. available under org.elasticsearch.action to perform add/update etc.

In my elastic search configuration I have

Search pool

threadpool.search.type: fixed
threadpool.search.size: 40
threadpool.search.queue_size: 200

Bulk pool

threadpool.bulk.type: fixed
threadpool.bulk.size: 20
threadpool.bulk.queue_size: 100

Index pool

threadpool.index.type: fixed
threadpool.index.size: 30
threadpool.index.queue_size: 100

Is my configuration right?

To avoid thread leaking, I could think of two solutions

  1. I am suspecting threads created by elasticsearch which are not under Tomcat control are causing the error. Is there a way elastic search using threads from the pool maintained by Tomcat. If so, what to be configured

  2. I dont want to expose it as a Restful service using RestSearchAction provided by elasticsearch. Is there other options like writing a plugin or registering my servlet in elasticsearch server so that client can invoke the url and do the indexing and I do the necessary transformations either inside plugin or servlet and remove war and also Tomcat

Thanks

Hello,

Sadly I am also facing the same problem.
Please let me know whether you managed to solve the problem.

Arun