Y
Y
Yuri2017-05-16 11:36:26
MySQL
Yuri, 2017-05-16 11:36:26

Why is communication between virtual machines slow?

There is a computer - mother Asus C60M1-I, ddr3 memory 8 GB (4x4swap).
It has VirtualBox on it. 2 virt. machines - 1) apache2+php, 2) mysql.
All 3 above systems on Ubuntu Server 14.04.
When opening a site on a virtual machine "1)" - "1)" accesses the mysql database on the virtual machine "2)".
And this is where the hitch happens. Namely: the answer takes a very long time. And sometimes it doesn't always return and throw an error. The response time is enormous.
On the arrangement of the network - there were 2 schemes:
1) Wirth. machine "3)" with OpenWRT on board. Acts as a router between physical and virtual networks. Wirth. machines "1)" and "2)" sit purely in the virtual network. Accordingly, access to apache2 on port 80, and requests to mysql go from it, if necessary.

After all the lags - I thought that the problem was Wirth. a router with OpenWRT (although it is strange, because the main-router at the entrance to the apartment is also on OpenWRT and with physical access between servers and computers of the norms).

2) Because of this, I decided to remove the "virt" machine from OpenWRT. And set up Wirth. machines "1)" and "2)" through the VirtBox network bridge and gave access to the physical local area network. But between Wirth. machines anyway goes disconnect or sooooo long request/response.

When I set it up so that everything was on one virtual machine and everything began to work in normal mode. Made mysql on the host machine and made requests from Wirth. machines to the host machine - again, everything is buzzing.

Accordingly - some problems with access between virtual machines.
Even the banal Adminer does not work.

Everything is done at home purely for the knowledge of Zen.

Danke

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey Permyakov, 2017-06-01
@Permyakov

Perhaps a problem in the dns. Try to connect directly to IP addresses. If it helps, then the problem is definitely in the dns.

I
Ilya Reitov, 2018-12-01
@reitoff

The problem here is not the connection. Although, this can also be, but, in my opinion, no. These are virtual machines, kamon. Moreover, this is the simplest VirtualBox. He always has problems with the network. I advise you to use another program.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question