Maria DB Concurrent Connections

In my Frappe application I am doing the REST api calls, issue which I am facing is whenever there are multiple API request, system gets Stuck for some moments.

I have checked the connection in the MariaDB, it is my observation that at a time only 1 Connection to DB is Maintained there are No Concurrent Connection opened.

Please help me with ‘How do I enable Concurrent Connections to DB’

What do you mean by concurrent connections?
Please explain with a use case.

@netchampfaris I think @rahmathbba is talking about the support of connection pulling used to start various connections to the same database at same time, and concurring which they to write, lock and release the database.

@rahmathbba, frappe use python-MySQLdb module that doesn’t support connection pooling and concurrence!

Thanks for the clarification @max_morais_dmm :slight_smile:

Team,

Concurrent connection issue

Frappe Framework:

Above is the Code snipped for the api call, which when call multiple times does not opens the concurrent connection. But we have Django Framework to connect the same DB with the below code and it is creating Concurrent connections.

Please help us as we don’t want to use another framework other than Frappe.

Regards

Team,

Concurrent connection issue

Frappe Framework:

Above is the Code snipped for the api call, which when call multiple times does not opens the concurrent connection. But we have Django Framework to connect the same DB with the below code and it is creating Concurrent connections.

Please help us as we don’t want to use another framework other than Frappe.

Regards

Have you checked the value of max_connections variable in your MariaDB config file?

yes, same DB is able to have multiple concurrent connection with the Django frame code

anybody can help in this topic

It’s highly unlikely that the problem will be fixed by using connection pooling. Even a single connection can process a large amount of concurrent transactions. That will most likely not be where your bottleneck is.

It’s highly likely that your bottleneck will be at the app server level. If you have not increased your gunicorn workers from the default of 2, that will be the place to start.

we are using the production OVA and Gunicorn is not installed in it. It will be helpful if you can guide us how to go about it.