Antonio Madonna
Antonio Madonna

Reputation: 919

vagrant slow page load after 60 seconds from last request

My Vagrant box running a classic LAMP stack (ubuntu 14, php 5.5.9) serves pages slowly (~ 5.3/5.5 secs) if more than 60 seconds passed since last page load. The "normal" page load (before passing the 60 secs limit) is ~0.2 sec. The application files are shared from the host system via NFS.

What I've debugged so far:

Any hints on what could be causing this ? I think it is clearly related to the large number of files that need to be accessed on NFS, but the 60 seconds thing seems weird to me...

Upvotes: 1

Views: 1779

Answers (1)

Antonio Madonna
Antonio Madonna

Reputation: 919

The problem was related to NFS attribute caching (that lasts 60 seconds by default) and solved it by setting the following mount options:

'nolock,vers=3,udp,noatime,actimeo=1'

See: Speed up sync latency between host and guest on Vagrant (NFS sync folders)

Upvotes: 4

Related Questions