I use channel API in my Java GAE application. It works perfectly fine after I deploy app. I can connect to server and get messages from it in real time. I can even reconnect to new channels when old one expires.
However if I keep my app open for few hours, this user cannot connect to server anymore. I'm getting 404 /_ah/channel/dev?command=connect&channel=XXX new Channel opening.
Instance shutdown via admin page doesn't help, however redeploying same code fix issue for another few hours.
Is there are any other solution rather that redeploying app every few hours?
The channel token expires after two hours, see here
You should create a new token for the same client id and establish a new channel when the error/closed state fires on the client