Open answerquest opened 6 years ago
Hi folks, just wanted to let others who are facing the same bug know that I figured out a workaround : I'm terminating and re-launching the program once every hour on my server.
Here's an abridged contents of a .sh file that is run through crontab
once every hour (note: you may need sudo permissions etc for the pkill command)
# kill any app currently running having "onebusaway" in the command line
pkill -f onebusaway
# Start onebusaway in background, so it keeps running even after you logout from ssh session
nohup java -jar /root/onebusaway-gtfs-realtime-visualizer/target/onebusaway-gtfs-realtime-visualizer-0.0.1-SNAPSHOT.jar --vehiclePositionsUrl=[URL] &
Every once in a while this error happens and the program stops. It may be the case that it read the feed while it was being written on server. I'm running on a test server and haven't put in mechanisms at present to handle that situation.
Instead of halting the whole program there, it would be great to handle the exception and continue to next iteration. And maybe error out only when there's been something like 10 exceptions in a row. (so, a max retries setting like we have in download managers)