Skip to content

Instantly share code, notes, and snippets.

@ryun
Last active March 18, 2016 18:00
Show Gist options
  • Save ryun/7ccae7a1861c931cebc5 to your computer and use it in GitHub Desktop.
Save ryun/7ccae7a1861c931cebc5 to your computer and use it in GitHub Desktop.

Caching issues

Update /etc/nginx/nginx.conf to have sendfile off;

Then find the location of opcache.so (/usr/lib/php5/20131226/opcache.so):

sudo find / -name 'opcache.so'

Add the following to opcache.ini:

sudo nano /etc/php5/mods-available/opcache.ini
zend_extension=/usr/lib/php5/20131226/opcache.so
opcache.memory_consumption=128
opcache.interned_strings_buffer=8
opcache.max_accelerated_files=4000
opcache.revalidate_freq=0
opcache.validate_timestamps=on
opcache.fast_shutdown=1

Update the timezone:

sudo dpkg-reconfigure tzdata

Update the time so it's older than the host OS. For example your Host OS is at 10:01:00, then set your VM to:

sudo date --set 10:00:50
sudo service nginx restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment