Container status is 'Running' and producing logs, but output suggests container is unresponsive

I ran into an issue where a service in swarm is running, says its running under ‘docker service ps’, producing the correct logs/output, but not actually running the code. In this case, the code is simple python script that scales services up and down depending on the number of messages in an SQS queue. The latest logs showed that the queue was full when it actually has been empty for half a day. This is not an issue with the code, which has been in production for months with no issues. Has anyone run into anything similar?

Issue type: Unresponsive containers
Docker version: 18.06.1-ce
API version: 1.38
OS/Arch: linux/amd64

Steps to reproduce: I am not able to reproduce this, but my coworkers have run into this issue recently. It seems to occur when a service is running for more than a couple days.

Thank you in advance. This is my first post.

you might want to implement a HEALTHCHECK in that image then