application.createNewFormInstance cap to number of instances

Questions and answers on designing your Servoy solutions, database modelling and other 'how do I do this' that don't fit in any of the other categories

application.createNewFormInstance cap to number of instances

Postby bjorne.raga » Thu Oct 19, 2023 7:40 pm

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?
bjorne.raga
 
Posts: 6
Joined: Thu Oct 19, 2023 7:37 pm

Re: application.createNewFormInstance cap to number of insta

Postby jcompagner » Thu Oct 19, 2023 7:57 pm

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
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8833
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: application.createNewFormInstance cap to number of insta

Postby bjorne.raga » Thu Oct 19, 2023 8:29 pm

Where can I find the servoy.max.webforms.loaded property?
bjorne.raga
 
Posts: 6
Joined: Thu Oct 19, 2023 7:37 pm

Re: application.createNewFormInstance cap to number of insta

Postby sean » Fri Oct 20, 2023 12:26 am

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"
Software Engineer
Servoy USA
sean
 
Posts: 370
Joined: Mon May 21, 2007 6:26 pm
Location: USA


Return to Programming with Servoy

Who is online

Users browsing this forum: No registered users and 28 guests