Many things can cause this error. Misconfigurations with the Access rules, a failed API call, an action triggering the error in microflows, etc. It might give you more ideas to find out exactly when you got this error message by debugging it.
The Mendix Runtime, running locally on your machine, has a timer before it automatically shuts down. This is by default, and the timer is around 2 hours, albeit it's not set in stone as time can vary depending on actions around that time mark. Most common reason for this to occur is Mendix themselves don't want you to run your application indefinitely for obvious reasons.
There is basically no alternative, as to frequently (re)start your Mendix studio to keep it running. It's not a bug, but it's something you have to accept :)
This is not possible. You will have to restart the app manually. If you want your app to run indefinitely you’ll need to buy a license for that app.