Obsolete pages and VirtualBox

There is one other possible problem that manifests itself as users (or, more frequently, developers) seeing old versions of web pages in HTTP responses. There is a bug in VirtualBox virtualization software, which is very popular as a development virtualization solution (for example, with Vagrant or, more lately, Otto). VirtualBox is also sometimes used as a production virtualization technology. It has a feature named "shared folders", which allows it to have a copy of the host machine folder inside one of the guest machines.

The bug is in the handling of the sendfile() Linux kernel syscall inside VirtualBox. This syscall directly copies a file to a TCP socket, avoiding extra unneeded memory copies and providing all possible optimizations for this rather specific but very popular special case. You can imagine how well this case suits many Nginx workloads. Even if it is not just serving local static files, Nginx cache may use sendfile() very efficiently.

The support for sendfile() is conditional and may be switched off using this directive:

sendfile off;

It is highly recommended if you run Nginx inside VirtualBox and serve files from a shared folder.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.178.151