Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make script cache configurable and bounded #2539

Closed
imotov opened this issue Jan 11, 2013 · 0 comments
Closed

Make script cache configurable and bounded #2539

imotov opened this issue Jan 11, 2013 · 0 comments

Comments

@imotov
Copy link
Contributor

imotov commented Jan 11, 2013

Unbounded script cache may lead to running out of memory if a large number of scripts is generated on the client based on user input, time, or any other changing variables with unbounded range of values. To reproduce, start elasticsearch with 32M heap and run the following script for a few minutes: https://gist.github.com/7163ea88b52018cdb66c.

The script cache parameters should be configurable using the following settings:

  • script.cache.size - allows to specify the maximum number of compiled scripts to be stored in the cache. 0 means no cache, -1 - unbounded cache. The default value is 100.
  • script.cache.expire - allows to specify the length of time after a compiled script is last accessed that it should be automatically removed. The default value is no expiration.
@imotov imotov closed this as completed in e82f96f Jan 14, 2013
imotov added a commit that referenced this issue Jan 14, 2013
mute pushed a commit to mute/elasticsearch that referenced this issue Jul 29, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant