DB connection issues after an hour or two of running

Hello there! Fairly new to docker. Long story short I’m running a docker-compose file on mac, and using a database on windows. Works GREAT for an hour or two but after I get errors like;

realdevicemap | [ERR] [DBController] Failed to connect to Database: (Can’t connect to MySQL server on ‘192.168.1.12’ (110)
realdevicemap | [ERR] [WebHookRequestHandler] Failed to connect to database.

in between everything else thats happening in my window normally. Message sneaks in there a few times, then more and more often and after a while, I cannot even connect to my website anymore that’s being hosted by docker.

I’ll also start to get this message as well:

realdevicemap | [ERR] [MySQLSessions] Failed to prepare statement: MySQL server has gone away while SELECT token,userid,created, updated, idle, data, ipaddress, useragent FROM web_session WHERE token = ?

I can’t seem to figure out why this happens after about an hour or two of no issues!
Any suggestions would be greatly appreciated. Thank you!

1 Like

An update:
I woke up with my docker-compose up instance completely stuck and not able to connect any to the DB any longer, YET I was able to launch SequelPro and connect to the windows DB just fine! So its 100% something to do with docker on mac…

1 Like

Hello there, did you ever found a solution for this. I am having exactly the same issue.