Need help in understanding script - compilations from _nodes/stats

Hi All,

We are getting circuit breaker exceptions on script compilations during watch deployment, and after increasing from default 75/5m to a higher value viz. 200/5s, it worked. But, wanted to check what is the exact number of scripts that were running given a time range. Used _nodes/stats to check the state of nodes , which results something like below for each node

"script": {
"compilations": <Varied number for each node ranging from 2000 - 25000>,
"cache_evictions": <Varied number for each node ranging from 2000 - 25000>
}

I'm not sure how to read this. If it is 75/5m it should be failing for every deployment and every watch that is running behind. Any help in reading and understand how to get current compilations/minute would help.

NOTE: The CPU usage was less so we did not have any issue after increasing compilation rate.

These numbers are cumulative totals. To work out the rate at which these things occur, you need to take two readings some time apart and subtract one from the other. The derivative aggregation is one way to do this.

Thanks David. Given that it is cumulative, the first time when I use stats API, is it the number shown is from the time of cluster-node start. Please correct me.

Yes (in the master branch anyway, I haven't checked all versions). It is zero when the node starts, increases by 1 on each compilation, and is never reset to zero:

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.