Mendix App having a lot of slowness due to large concurrent Users 110 users

We have a Mendix App running inside Azure VM. The userbase has grown exponentially and so far we had not faced much issues.    But recently we have started facing below Issue.   The App is deployed in Server based deployment model inside and Azure VM using Mendix Service Console and  The App is basically used to capture some Checks against a Product. The Ground users use the Phone app to scan a QR code and identify the Product and capture the Checks for the Product and mark a check as OK / NOT OK and the data gets persisted in mendix DB   We have a Phone Web profile for ground users and Responsive Web profile for Admin Users The Phone Web users have grown and now we observe that during the peak time when we face issue we have about 110 and greater concurrent users. When the Phone user performs the check and submits / Clicks Complete button, the microflow is triggered and performs a lot of backend checks and saves all the Checklist data. Now the issue is when the users click the button throuhghout the day it normally takes about 12 seconds. But now even after 50 seconds or in some cases 1 minute, it still fails to complete the microflow and on the Mobile client side, we get the generic error Contact your administrator. But we dont see any errors / timeouts in Mendix Service Console when the Client side faces issue.   Below is the architecture End User (Phone) ----→ Azure Application Gateway ---→ Azure Mendix VM server --→ PostgreSQL Database    So the request from the Phone user first reaches the Azure App gateway and from there it goes to the server. During peak hours we have tried replicating the issue in our local machine and our smartphones and we are not able to replicate the issue. When we perform the same checklist and click Submit, it executes and submits within 20 seconds or 30 seconds which is a little slow but we are not getting any Contact Admin error.   But the actual end users are accessing this app inside the Distribution centre of the Client Product using a Wifi Netwrk and the 100 Concurrent users are spread across India and when they try to do the same check, many of them are facing the issue.   Prior to this, we have even upgraded the VM. The VM now has 32 vCPUs and 64 GB of RAM We have also increased the Java Heap memory to 4 GB. And after enabling the monitoring, we can see during the peak hours, heap memory is less than 2 GB consumed and OS RAM is about 20 GB consumed. Actually the server is underutilized.   How can we figure out what is causing the slowness, considering the App Architecture, deployment configuration. Kindly help or suggest.   Thanks & regards, Aniketh
1 answers

In Mendix Cloud v4 there is a Metrics page where you can monitor running processes and even check the specific action where a process is. Then you could find out if it’s a rest call, a commit, a java action, a retrieve or whatever that is the common culprit. Maybe you could check, with Mx Support if necessary, if Azure offers a similar function. When you find out more, you could maybe start optimizing a retrieve etc. If it’s slow on a commit, you could remove indices. An index slows down committing, especially when a lot of users do the same thing simultaneously. And maybe you could execute some of the logic in a task queue, so users don’t have to wait for everything to be finished.

More on performance here.