This post appears a little old, but my current observation of "gray outs" and lost server connections seems maybe related.
I've found with at least one of my apps hosted on Spark, the browser will gray out and the connection to the shiny server is lost, apparently due to inactivity. If I am interacting with the app, I have not seen this happen. If I leave it idle in the browser, however, it may (but not always) gray out. It works again on refresh. I thought maybe Spark has some kind of inactivity time out feature that is somewhat new, since I have never seen this happen before and I have many times had apps open in my browser for very long periods of time without issue. But I also noticed that the gray out does not always happen, and when it does, it can be 45 seconds after loading the app and leaving it idle, or after five minutes, or 15 minutes. It is highly variable. My last observation is that it does not seem to happen on our self-hosted shiny server, only on Spark. Though, with the intermittent nature of the gray out, it is hard to know for sure.
Here is an example of three log files on Spark from two runs of the app, the first where it does not gray out and I close the connection myself by exiting the browser, and the second and third where I get the gray out:
@spark:~/.log
Listening on port 38875
Execution halted
@spark:~/.log
Listening on port 54443
Execution halted