We are seeing a lot of connection bus error when we are running a load test for 250 concurrent users.

0
We recently upgraded our app from 8.18.1 to 9.6.7 . We thought of running a load test on both to compare the performance under same load. To our surprise we started seeing  JDBC connection error in the logs. The log shows that number of  active connection has reached 50 , with 0 idle connections. We have configured ConnectionPoolingMaxActive as 750. Can anyone help .We are using Azure AKS to host the Mendix app.   Also is there way to see runtime settings using the runtime API. I could not find a way in the docuementation.
asked
2 answers
0

The default number of connection to the database is 50.

The ConnectionPoolingMaxActive is only limiting the maximum active instances in the pool.

So if the pool is 50 then setting the maxactive to a higher number will not result in anything.

From the apache documentation:

maxActive controls the maximum number of objects that can be borrowed from the pool at one time. When non-positive, there is no limit to the number of objects that may be active at one time. When maxActive is exceeded, the pool is said to be exhausted.

If you need to increase the number of database connections you need to talk to mendix support for this, but be aware that adding additional connections will probably need additional cpu and RAM resources as well.

answered
0

Mendix support is of no help if you are not on Mendix cloud. They will spend significant time of time asking for code , logs and still not provide satisfactory diagnosis or resolution.

 

Here is what we did - 

 

1. Restore a copy of the database on your local machine. Try to do a SQL trace , that might help you to find if you have long running queries or resource intensive queries. You may identify and fix them.

2. Focus on microflows which are trying to commit large number of objects ( more than 500 ) or committing inside a loop or long microflows. These are most common cause of database table locks and hence the delays and connection bus errors. 

3. When you are doing an upgrade , make sure to clean up the lib folder. This is a nightmare every time we do an upgrade. Some old lib files can also cause intermittent issues.

 

Good luck.

 

answered