I am having this issue for a while I am not sure how to fix it. I have a Docker container running PHP+Apache with an application. The MySQL and MongoDB servers are on the same network as the host. So:
- MySQL DB Server IP: 192.168.1.98
- Mongo DB Server IP: 192.168.1.98
- Host: 192.168.1.90
For some reason the connectivity between the application running on the container and the DB server is pretty slow and sometimes it takes more than one minute running long queries.
I can say the problem is not the DB server because running the same application on the same server works fast so I think is something related to networking but I am not sure what or why.
Can any give me some advice around this?