Wrning Request state size of 1204 objects exceeds the threshold of 100 objects

3
After upgrading our application to Mendix 7 we get various warning messages in our run-time log, which we are unable to solve. Any help on these? For example: Level: Warning LogNode: RequestStatistics Message: Request state size of 1204 objects exceeds the threshold of 100 objects. Request details: type 'executeaction' in session 'fed9617b-1b0b-4ca7-8782-be41b2b99397'. State consists of:  * ST_ModuleA.EntityA: 2 objects * ST_ModuleB.EntityB: 1200 objects * ST_ModuleC.EntityC: 2 objects The microflow did run succesfully. Why would such an error be generated and how to solve it?
asked
3 answers
8

Hi Martin,

See the following page on more information as to why these warning are generated:

https://docs.mendix.com/refguide/transient-objects-garbage-collecting

The important section from the documentation:

- Choosing the right level for the threshold is crucial because when it’s set too low it will trigger too often and setting it too high will cause the detection of problems too late. It is meant to detect state memory leakage, which means that state grows to certain levels and does not get properly garbage collected. In some apps it is possible that some pages use a large amount of non-persistable objects to show the data on-screen. In that case the threshold should be larger then the amount of objects that are normally shown in this screen to prevent this warning from being logged too often. -

Note; you can change the threshold in your project settings->configurations->Custom settings-> Create new setting with name com.mendix.webui.StateSizeWarningThreshold and value <the value of your choice, eg 2000)

See screenshot below:

 

 

 

 

 

 

answered
2

Hi Martin,

This has to do with the new way of how Mendix handles objects. Since Mendix 7, all objects are being sent to the client. This is required in order to create a stateless server architecture. As you can imagine, sending many objects to the client may cause performance issues in some cases. Therefore, the warning is being shown.

You can read more about this in the Mendix 7 release notes: https://docs.mendix.com/releasenotes/desktop-modeler/7.0

Hopefully this answers your question.

~Jeroen

answered
1

The objects are only sent to the client if they contain unsaved changes, or are non persistent entities, or are displayed in the client.

Are you using persistent entities, and commiting all created entities before the end of the microflow which does the import?

answered