Hello Benoit,
The stack overflow occurs when a thread stacks overpass the limitation. A function’s stack increase when going deeper in call (typically recursive calls), with functions parameters and local variables.
As you said the stack limitations are defined with two main parameters:
- Maximum size of thread stack (in blocks): this is a max number of block that one stack can take
- Number of blocks in pool: this is the total number of block that all the stacks will share
A quick solution, if you have enough memory will be to increase both the pool of blocks and max per stack.
As your SOE occurs when parsing a JSONObject, is your json big? Could you handle your json with streams (ej.library.iot.json#1.0.0)
Regards,