Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!
  • Guest, before posting your code please take these rules into consideration:
    • It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
    • You can also use markdown to share your code. When using markdown your code will be automatically converted to BBCode. For help with markdown check out the markdown guide.
    • Don't share a wall of code. All we want is the problem area, the code related to your issue.


    To learn more about how to use our BBCode feature, please click here.

    Thank you, Code Forum.

What is the max connection limit in mysql remote database

coderhimanshu

New Coder
I am using a cloud remote mysql database and I want to ask what is the max connection limit shown in mysql datbase information. I am creating a python application that will be used by more than 1000 users at a time and the max connection shown is 75 can my application handle the request from mysql server or it will fail to do so. And if it fails what to do ? . Is this 75 for different applications or 75 connection for single application ?
 
Hey and welcome, so the answer is. It depends. You can set a max connection amount, if memory serves me right mine is 1100 on my PI WHY? Because why not lol.

So connection is each time someone goes onto your database so say, i request all of the names from your database, get them then show them. This is one connection. Once the request is done the connection is closed no matter how long i sit there looking at the data.

Issue you may face is called a Database Lockout, What this is, is when two requests need the same data but both have half each so cant go any further and lock them selfs. I beat this by having my scripts look for a value on a separate table, The idea is. While the value is 1 they would wait 1 minute and then look again, Once its 0 one would update it to 1 then get the data needed and when finished turn the value to 0. This broke all Database Lockout issues for me.

In a sense you could do the same thing here. There is a way of doing it with SQL but i cant remember how but this gives you a rough idea of what im getting at.

Python:
DatabaseConnections = Get database Value

While True:
    if DatabaseConnections < 75:
        DatabaseIncrease = DatabaseConnections+=1
        Update database value with DatabaseIncrease
        
        Get data from database
        
        DatabaseDecrease = DatabaseConnections-=1
        Update database value with DatabaseDecrease
        
        break
 
Back
Top Bottom