CloudDBError: ERR max number of clients reached CloudDB

Hello, I made an APP using APP Inventor. For storage purposes I used CloudDB, but I created a new Redis server and put the connection information (port, server and token) in the corresponding configuration fields in the APP Inventor environment.
The APP is working fine with this storage, but very often I'm getting the warning "CloudDBError: Error max number of clients reached CloudDB disable, restart to re-enable". When this happens, I have to kill the APP and start it again.
I have been searching how to solve this. It seems that the problem is that CloudDB is creating a new database connection each time that I make a query (at least, that's what I understood), and obviously that's a problem. I supose there are two ways of solving this:
a) To be able to kill cloudDB connections trough the code
b) To increase the number of available max connections (this would be just a temporary solution, as the problem would had not been really solved)
Any idea abouty what should I do?
If the solution is to increase the number of available max connections, I don't have a clear idea about how to do it. As I said before, I'm using my own Redis server and I access it through the Redsmin environment.
Thanks in advance for your help.
Regards!

Well, I continued my investigation and it seems that my Free Redis Server plan includes 30 connections. Anyone know how many connections supports the default cloudDB server? Maybe a solution could be to move the storage there...

By that are you referring to App Inventor's Cloud DB? It is there for testing only really.
How many people do you actually have connecting at the same time?

If you already have your own Server (via a Web Host such as IONOS, GoDaddy etc) then you have access to an SQL database. Another possibility might be to use Google Sheets.

The "free plan" on RedisLabs is quite limited, a) no SSL, b) number of connections. In my trials with it i found that a single link up from my app was using @ 20 connections, with only 30 available, and soon caused the problem you describe.

  1. Try with the MIT CloudDB server to see how you get on. As long as you do not "go large" with the data side of things you should be OK. There is no guarantee that your data will always be there however, because this service is really only designed for testing.

  2. As @ChrisWard suggested, you can build your own Redis server if you have your own online presence. See here (not for the faint-hearted!):
    HOWTO: Setup Redis Server with SSL for use with AI2

Thanks for your answer. I finally upgraded my Redis Server plan to a payment one. For 6 euros per month now I can have up to 256 concurrent connections. It seems enough for my purpose. At least for the moment the "max number of clients" problems has dissapeared. Best Regards!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.