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’
@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!
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.
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.
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.