So I had this issue for a while, where starting my Play app on one of my Digital Ocean VM was very slow... it used to be stuck after configuring the logs.
I finally had some time to look into it today and managed to reduce the startup time to close to nothing. It was some DNS thing again...
Upon startup, the MongoDB ObjectId apparently uses the local IP address or something and the stack trace clearly indicated that the DNS lookup from Java was slow. After some googling, the culprit was the actual DNS server.
Anyways - long story short, make sure the Google DNS is first in the
You can certainly edit it - you should in fact. The 184.108.40.206 was my first in the list on that box and simply by putting it last, the startup became instant.
cat << EOF >> /etc/resolv.conf nameserver 220.127.116.11 nameserver 18.104.22.168 nameserver 22.214.171.124 EOF
I have no clue why this box was setup differently, but it was.