Connection reset by peer Error on Data-Intensive Page

0
We're currently facing a recurring issue in our Mendix application, and would appreciate any insights you might have. Here's the situation:   Issue Users are encountering the following error when trying to access a particular page: "An error occurred. Please contact your system administrator." In the application logs, this is consistently matched with: ... Connection reset by peer ...   Our Investigation So Far No recent changes were made to the microflows or page logic directly related to the issue. The issue persists even after restarting the app.   Technical Page Structure The page in question has the following structure: 1 Data View that calls a microflow as its data source: Creates a Helper object with startDate and endDate. Retrieves data from the Card entity twice, each with different conditions, producing two separate list. Each list is committed and associated with the Helper using: Helper_CardA (for Data Grid A) Helper_CardB (for Data Grid B) The 2 Data Grids on the page retrieve data via those associations. The Helper entity also includes 6 calculated attributes, each running separate queries with their own logic.   Our Hypothesis We suspect this structure may be introducing performance issues — especially due to: Multiple large data retrievals Commits and associations The use of calculated attributes on load This might be overwhelming the server or causing the connection to drop, leading to the “Connection reset by peer” error.   Has anyone else experienced something similar? Could the page structure and microflow complexity indeed lead to these timeout or connection issues?
asked
1 answers
1

Hi Fesa,

 

I don't know the exact answer, but I would try the following:

- Speed up the retrieval using indexes to prevent full table scans. to save some time.

- Try to avoid the calculated attributes. Examine if the data is truly dynamic by the time of reading. If only when writing, convert them into a Before Commit.

- If the calculation is required when reading the data, try pushing it to the client-side. Load a grid with the source values of the calculations and provide a client-side Nanoflow to add the calculated values. It would involve a non-persistent object that is filled from the retrieved values. 

- Optimize the pooling of the request to the database: https://docs.mendix.com/refguide/custom-settings/#connection-pooling

 

Go Make It

 

answered