R
R
Roman_S12017-03-12 17:14:50
symfony
Roman_S1, 2017-03-12 17:14:50

What could be the reason for the very long loading of symfony3 on vagrant?

On a bare project, loading is extremely long.
eb86063ae9c04f37916befc23d3f54db.jpg
I'm running on a vagrant.
To access the dev panel in app_dev added ip '10.0.2.2'
apache config (copied from official website):

<VirtualHost *:80>

  ServerName project.dev
  ServerAlias www.projectn.dev

  DocumentRoot /var/www/project.dev/web
  <Directory /var/www/project.dev/web>
    AllowOverride None
    Order Allow,Deny
    Allow from All

    <IfModule mod_rewrite.c>
      Options -MultiViews
      RewriteEngine On
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteRule ^(.*)$ app_dev.php [QSA,L]
    </IfModule>
  </Directory>

  <Directory /var/www/project.dev/web/bundles>
    <IfModule mod_rewrite.c>
      RewriteEngine Off
    </IfModule>
  </Directory>

  ErrorLog /var/log/project.dev.error.log
  CustomLog /var/log/project.dev.access.log combined
</VirtualHost>

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
AlexeyKosov, 2017-03-12
@Roman_S1

The reason is the very slow shared folders mechanism in Virtual Box.
Options:
If host on Linux - use NFS.
If the host is Windows, then you need to make sure that at least the var and vendor directories are moved outside the shared folders, and even better, that the entire project code "lives" inside Linux, and access it from the host machine, for example, via samba .

I
index0h, 2017-03-12
@index0h

Very likely - caches and logs in var/. It takes a lot of time to synchronize them.
Under vagrant, I recommend disabling automatic synchronization of the project and doing it from the IDE upon changing the file.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question