Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems with boot2docker / sendfile #17

Open
nekaab opened this issue Apr 25, 2015 · 1 comment
Open

Problems with boot2docker / sendfile #17

nekaab opened this issue Apr 25, 2015 · 1 comment

Comments

@nekaab
Copy link

nekaab commented Apr 25, 2015

Hi,

I wasted 3 hours on this, so maybe this helps someone:

Nginx was serving stale / old files, only solveable by restarting the boot2docker vm. I blamed nginx, apparently wrongly so.

After a lot of different approaches, I stumbled upon https://jeremyfelt.com/2013/01/08/clear-nginx-cache-in-vagrant/ . I changed the nginx.conf as such:

docker run --rm -t -i fbaaken/nginx-php /sbin/my_init -- bash -l
root@0e96ebfdb15b:/# vi /etc/nginx/nginx.conf
(Edited to sendfile off;)
(Committed container state to new image so to not lose changes)
(Ran from the new image from then on)

Hope this helps someone. I will keep the issue open, maybe there is a way to make this easier to configure when running the container so we can sue the same on in dev / prod environments when it's not running on a Virtualbox image (sendfile should be on in this case).

Best,

Felix

@AnneTheAgile
Copy link

ty @nekaab . This does indeed sound helpful, since it appears sendfile is such an important config [1].
AnneTheAgile
1.[] ; 2014-08; ; ; ;Nginx initial fame came from its awesomeness at sending static files. This has lots to do with the association of sendfile, tcp_nodelay and tcp_nopush in nginx.conf. ; ; ;Most articles dealing with optimizing Nginx performances recommend to use sendfile, tcp_nodelay and tcp_nopush options in the nginx.conf configuration file. Unfortunately, almost none of them tell neither how they impact the Web server nor how they actually work. ; ; X.Nginx Optimization: understanding sendfile, tcp_nodelay and tcp_nopush ; ; https://t37.net/nginx-optimization-understanding-sendfile-tcp_nodelay-and-tcp_nopush.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants