You are right. It stopped printing (and stop running too) after ~70 seconds after being started.
I guess it tried to connect to the database and the socket get closed immediately by the OS and the handle to the socket became invalide. However, the handle was still used in some epoll_wait call and caused the epoll_wait function to return immediately, instead of waiting for the delay provided in argument...