CloudDB time out issue

Its only logical that the server has a 'feature' where it will time the user out after X amount of inactivity. Does anyone know what the value of X is for App Inventors CloudDB?

I have an app that stores data on CloudDB and am experiencing a timeout. When a user uses the app they will save data to the DB once in a while, maybe a minute or two since the last entry.. but many times the connection has already timed out.

Is there a PING type method that I can send to the server to simulate activity to prevent the timeout from happening until the user can send their data?

I am not aware of, and have not experienced any timeout with cloudDB.

Let us find out.

I never experienced a timeout either using the default server. Are you using the default server or your own Redis server?

you might share your Blocks Carl. What you experience might be an issue with your code. None the less, to see if there is an issue, MIT would need an example app to test.

I am not using my own Redis server, I am using the default.

I am not sure which blocks to share without having to share the entire set and thats a lot of blocks.

The exact error message I get is this:

Software caused connection abort

Now that I think about it, it may not be on the server side. The error only happens seemingly when the phone goes to sleep. I have mine set to sleep after 15 seconds, and when it wakes up it needs a 'poke' to connect and work again. I will try to make a new post/data edit and I get the error message. If I try again it works fine, as if it reconnected. I am willing to bet that is the problem.. when the phone goes to a power saving sleep mode it momentarily disconnects.

I did just test this theory.. I went into Developer Mode on my phone and set the phone NOT to sleep when on the charger. When I have the phone on the charger I no longer have the error. That must be what is happening.

Sorry for posting the issue. I will figure out a work around.

Are you behind a network address translation (NAT) box? NAT boxes keep track of network connections, and some will time out (and abort) a connection that is idle too long. These devices also have a limited amount of memory for keeping track of connections, and when that runs low, they will discard the least recently used connection.

1 Like

P.S. Most home routers, and many routers in schools are NAT boxes...

I honestly do not know, but I can login to my home router here and check to see. If NAT is turned off I can see if there are adjustable settings. We shall see.

AI2 apps do not run in the background (without use of extensions). They will disconnect from services after a few minutes. You really should have advised on this in your OP (original post).


Understood. Lesson learned. And BTW, I did not see any NAT settings in my router. Doesn't mean they are not there, I may just not have access to them.

Likely, your router is a NAT box, but it doesn't matter. The phone sleeping is the problem, as you now know.

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