Threadpool queue_size: 0 kills JVM

Here is something interesting!

Added this to elasticsearch.yml and restarted ES:

threadpool:
search:
type: fixed
size: 120
queue_size: 0 <==== note this
reject_policy: abort

Got this in wrapper.log:

INFO | jvm 1 | 2012/06/25 17:48:36 | {0.19.4}: Initialization Failed
...
INFO | jvm 1 | 2012/06/25 17:48:36 | 1) IllegalStateException[This is
a proxy used to support circular references involving constructors. The
object we're proxying is not constructed yet. Please wait until after
injection has completed to use this object.]2)
IllegalArgumentException[null]
STATUS | wrapper | 2012/06/25 17:48:39 | <-- Wrapper Stopped

I then changed queue_size to 1 and the problem disappeared.

ES bug or?

$ java -version
java version "1.6.0_29"
Java(TM) SE Runtime Environment (build 1.6.0_29-b11)
Java HotSpot(TM) 64-Bit Server VM (build 20.4-b02, mixed mode)

Thanks,
Otis

Search Analytics - http://sematext.com/search-analytics/index.html
Scalable Performance Monitoring - http://sematext.com/spm/index.html

Yea, 0 is not a valid value for the fixed thread pool, it should be >0,
since we create a bounded queue and it has to have at least 1 element to be
able to "pass" it to the thread pool.

On Tue, Jun 26, 2012 at 12:23 AM, Otis Gospodnetic <
otis.gospodnetic@gmail.com> wrote:

Here is something interesting!

Added this to elasticsearch.yml and restarted ES:

threadpool:
search:
type: fixed
size: 120
queue_size: 0 <==== note this
reject_policy: abort

Got this in wrapper.log:

INFO | jvm 1 | 2012/06/25 17:48:36 | {0.19.4}: Initialization Failed
...
INFO | jvm 1 | 2012/06/25 17:48:36 | 1) IllegalStateException[This is
a proxy used to support circular references involving constructors. The
object we're proxying is not constructed yet. Please wait until after
injection has completed to use this object.]2)
IllegalArgumentException[null]
STATUS | wrapper | 2012/06/25 17:48:39 | <-- Wrapper Stopped

I then changed queue_size to 1 and the problem disappeared.

ES bug or?

$ java -version
java version "1.6.0_29"
Java(TM) SE Runtime Environment (build 1.6.0_29-b11)
Java HotSpot(TM) 64-Bit Server VM (build 20.4-b02, mixed mode)

Thanks,
Otis

Search Analytics - Cloud Monitoring Tools & Services | Sematext
Scalable Performance Monitoring - Sematext Monitoring | Infrastructure Monitoring Service

Hi Shay,

Yeah, I realized that might be the case after posting, but then, check the
doc:
" The queue_size allows to control the size of the queue of pending
requests that have no threads to execute them. "

So one can then thing like this:
"OK, and if I don't want to queue up any pending requests and I just want
to reject any requests that exceed the number of threads, I'll just set
queue size to 0".

Shouldn't one be able to do this?

Otis

Search Analytics - Cloud Monitoring Tools & Services | Sematext
Scalable Performance Monitoring - Sematext Monitoring | Infrastructure Monitoring Service

On Monday, June 25, 2012 8:02:09 PM UTC-4, kimchy wrote:

Yea, 0 is not a valid value for the fixed thread pool, it should be >0,
since we create a bounded queue and it has to have at least 1 element to be
able to "pass" it to the thread pool.

On Tue, Jun 26, 2012 at 12:23 AM, Otis Gospodnetic <
otis.gospodnetic@gmail.com> wrote:

Here is something interesting!

Added this to elasticsearch.yml and restarted ES:

threadpool:
search:
type: fixed
size: 120
queue_size: 0 <==== note this
reject_policy: abort

Got this in wrapper.log:

INFO | jvm 1 | 2012/06/25 17:48:36 | {0.19.4}: Initialization Failed
...
INFO | jvm 1 | 2012/06/25 17:48:36 | 1) IllegalStateException[This
is a proxy used to support circular references involving constructors. The
object we're proxying is not constructed yet. Please wait until after
injection has completed to use this object.]2)
IllegalArgumentException[null]
STATUS | wrapper | 2012/06/25 17:48:39 | <-- Wrapper Stopped

I then changed queue_size to 1 and the problem disappeared.

ES bug or?

$ java -version
java version "1.6.0_29"
Java(TM) SE Runtime Environment (build 1.6.0_29-b11)
Java HotSpot(TM) 64-Bit Server VM (build 20.4-b02, mixed mode)

Thanks,
Otis

Search Analytics - Cloud Monitoring Tools & Services | Sematext
Scalable Performance Monitoring - Sematext Monitoring | Infrastructure Monitoring Service

Yea, he should, Igor sent a pull request allowing to use 0, it will be part
of 0.19.7.

On Tue, Jun 26, 2012 at 3:53 AM, Otis Gospodnetic <
otis.gospodnetic@gmail.com> wrote:

Hi Shay,

Yeah, I realized that might be the case after posting, but then, check the
doc:
" The queue_size allows to control the size of the queue of pending
requests that have no threads to execute them. "

So one can then thing like this:
"OK, and if I don't want to queue up any pending requests and I just want
to reject any requests that exceed the number of threads, I'll just set
queue size to 0".

Shouldn't one be able to do this?

Otis

Search Analytics - http://sematext.com/search-**analytics/index.htmlhttp://sematext.com/search-analytics/index.html
Scalable Performance Monitoring - http://sematext.com/spm/index.**htmlhttp://sematext.com/spm/index.html

On Monday, June 25, 2012 8:02:09 PM UTC-4, kimchy wrote:

Yea, 0 is not a valid value for the fixed thread pool, it should be >0,
since we create a bounded queue and it has to have at least 1 element to be
able to "pass" it to the thread pool.

On Tue, Jun 26, 2012 at 12:23 AM, Otis Gospodnetic <
otis.gospodnetic@gmail.com> wrote:

Here is something interesting!

Added this to elasticsearch.yml and restarted ES:

threadpool:
search:
type: fixed
size: 120
queue_size: 0 <==== note this
reject_policy: abort

Got this in wrapper.log:

INFO | jvm 1 | 2012/06/25 17:48:36 | {0.19.4}: Initialization
Failed ...
INFO | jvm 1 | 2012/06/25 17:48:36 | 1) IllegalStateException[This
is a proxy used to support circular references involving constructors. The
object we're proxying is not constructed yet. Please wait until after
injection has completed to use this object.]2)
IllegalArgumentException[null]
STATUS | wrapper | 2012/06/25 17:48:39 | <-- Wrapper Stopped

I then changed queue_size to 1 and the problem disappeared.

ES bug or?

$ java -version
java version "1.6.0_29"
Java(TM) SE Runtime Environment (build 1.6.0_29-b11)
Java HotSpot(TM) 64-Bit Server VM (build 20.4-b02, mixed mode)

Thanks,
Otis

Search Analytics - http://sematext.com/search-**analytics/index.htmlhttp://sematext.com/search-analytics/index.html
Scalable Performance Monitoring - http://sematext.com/spm/index.**htmlhttp://sematext.com/spm/index.html