Slow response time: Laravel 5.2 in a Docker container

When I launch Laravel 5.2 in the PHP-7 docker container, I get response time in 300ms - 400ms.

This is very slow, although if I just repeat phpinfo()in the same container, the response time 15ms - 50msis - does anyone experience this slow response time with Laravel in the Docker container?

+4
source share
1 answer

Ok, the problem is resolved.

In a local development environment using Docker 1.10 with a VirtualBox driver and a volume mounted on the host system (this will be Boot2Docker VM and OSX), the performance is incredibly bitter, as described above 300ms - 600ms.

20ms - 30ms. , , Laravel - - , , , VirtualBox .

Docker Laravel, VM VirtualBox.

UPDATE:

: : artisan optimize --force artisan config:cache

  • HHVM 13 - 31 ( TCP 9000)
  • HHVM 12 - 22 ( Unix)
  • PHP-7 FPM 42 - 73 (TCP- 9000)
  • PHP-7 FPM 38 - 55 ( Unix)

WOW...!

HHVM with artisan optimisations + unix sockets: 8ms - 12ms


PHP-7 FPM + unix: 38 - 42

HHVM unix. .

+3

Source: https://habr.com/ru/post/1628049/


All Articles