R
R
Reshat2015-12-30 17:23:06
JavaScript
Reshat, 2015-12-30 17:23:06

Why does nginx return it with errors after updating a large JS file?

Environment: Windows, vagrant on it, Linux on vagrant, website on it.
Problem: I am editing a large JS file, I request it in the browser, but it is either not complete or has been supplemented with incomprehensible characters.
I download this script, put it next to the original one, I see that the size is the same up to a byte, but the content is different.
It is treated by rebooting the virtual machine. This is not a site cache.
Where to dig?
UPD if you delete everything from the file and write for example "1234", then by opening it in the browser, you can see 4 characters of the old code, but not "1234". Maybe some nginx cache?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
MaEcTPo, 2015-12-30
@Reshat

I faced this problem.
On the Internet, they complain that the problem is with vboxfs, and in order for everything to work, you need to disable the sendfile directive in nginx, in the http section in the file `/etc/nginx/nginx.conf`

http {
  sendfile off;
}

Everyone unsubscribes and says that it works. It didn’t work for me, but, apparently, somewhere with the configs I have something else.
Therefore, I switched to Apache for development in conjunction with the docker, and everything started there the first time.
Related links:
Vagrant's dock
More details on stackoverflow
A little more explanation

D
Dmitry Belyaev, 2015-12-30
@bingo347

If you upload via ftp, then the file may not be written to the end when the connection is broken, because ftpd writes file as soon as it is received from client

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question