AbstractScheduledService stop slient
I am using AbstractScheduledService to schedule my background job in a dropwizard project. Those jobs will run every 5 mins, but they will stop without any notification after a day or two.
One thing I have done to investigate this issue is to add more log, and I found that the there was no more log recorded after a period of time, normally one or two days. So it seems that AbstractScheduledService is stopped silently.
Another thing I have done is to try to restart the stopped jobs (and I realised it is not restartable). However, I found that the state of all job were still RUNNING which is confusing me.
Now I have to restart my entire application daily, and it works.
So, can you please help me on this issue?
Cheers, Dong
I have encountered the same issue. In my runOneIteration overriding AbstractScheduledService method I am pooling Amazon SQS queue and in the queue monitoring I can see that after 2 or 3 days it stops pooling the queue.
Do you have any workaround instead of restarting the application?
@Marcin-Piczkowski A similar thing happened to me: My FTP polling AbstractScheduledService didn't run for a few days and I had to restart the application when I spotted this. The cause was a missing timeout (there are three timeouts in the FTP client and I missed one of them), waiting forever on a broken connection.
A new iteration doesn't get started when the last one didn't finish. That's by design, not a bug. Use logging and/or jstack to find out more.
This seems more appropriate for StackOverflow