Hi, I’m new to scripting, I need to evaluate a scr...
# scripting
h
Hi, I’m new to scripting, I need to evaluate a script every time the application gets a http request and it increases metaspace and loaded classes. Does anybody know how to keep it under ** size?
n
what do you mean with that? memory consumption or such ?
h
yes, I actually found the answer, to put Jvm options
Copy code
-XX:MetaspaceSize=100M
-XX:MaxMetaspaceSize=150M
-XX:MaxMetaspaceFreeRatio=70
d
i had the same issue. what i did was cache the class once it was compiled and reuse it. it also shaved a heap off the response times (from a few hundred ms to < 10)
h
yes I believe cache reduces a lot of work. The option I mentioned above is necessary if evaluation of new script happens many times