Page 1 of 1
application.createNewFormInstance cap to number of instances
Posted:
Thu Oct 19, 2023 7:40 pm
by bjorne.raga
We ran into an issue recently in our questionnaire application where forms created via “application.createNewFormInstance()“ were automatically getting destroyed after a certain amount (~110).
Some questions related to this:
1. Is this a hard cap/limitation, or is the cap settings based?
2. If it is settings-based, could you point us in the right direction regarding updating that setting?
a. Is there anything we need to avoid or be aware of when going higher with form instances created in this manner?
Re: application.createNewFormInstance cap to number of insta
Posted:
Thu Oct 19, 2023 7:57 pm
by jcompagner
there is a servoy property for that:
servoy.max.webforms.loaded
which is max 128 for NGClients..
you can increase that if you want.
What you also can do is keep a references to that form in a global variable like and array
var myforminstances = [];
myforminstances.push(formInstance)
this way we know you dont want to kill that form when the threshold is met, this does mean if you do that for all your forms its kind of setting that property to 1000 or so, and clients will consume more memory
Re: application.createNewFormInstance cap to number of insta
Posted:
Thu Oct 19, 2023 8:29 pm
by bjorne.raga
Where can I find the servoy.max.webforms.loaded property?
Re: application.createNewFormInstance cap to number of insta
Posted:
Fri Oct 20, 2023 12:26 am
by sean
Hi Bjorne, This is just a config property for the application server. You can enter this in your servoy.properties file.
- Shutdown Servoy Developer
- Edit your servoy.properties file and add the following line: servoy.max.webforms.loaded=<your-increased-value>
- Save the file
- Restart Servoy
For a deployed instance you can modify this in the servoy.properties template file that is deployed to your .war
On a running instance you can modify this in the servoy-admin page, scroll to the bottom under "admin settings" and enter it in "system.properties"