hi, i used nginx 0.7.65 before, and i upgrade it to 1.0.0 yesterday,
but after this update ,i got some strange error.
i have a normal html web page call myHtml.html, it linked a css file
called myCss.css.
i open this web page, this is ok
i change some content of myCss.css.
i refresh myHtml.html, but i get 500 error of getting the css file:
(/dat/web is my root directory)
2011/04/14 12:29:35 [crit] 23140#0: *124 open() “/dat/web/myCss.css”
failed (11: Resource temporarily unavailable), client: 192.168.1.201,
server: *.test.com, request: “GET /myCss.css HTTP/1.1”, host:
“my.test.com”, referrer: “http://my.test.com/”
i press F5 to refresh this page again , then i got the normal html
and css file, everything seems ok.
On Thu, Apr 14, 2011 at 12:46:24AM -0400, jeff14 wrote:
server: *.test.com, request: “GET /myCss.css HTTP/1.1”, host:
“my.test.com”, referrer: “http://my.test.com/”
4. i press F5 to refresh this page again , then i got the normal html
and css file, everything seems ok.
can everybody tell me what happen? thanks
Which OS? Which filesystem? Which editor? From error returned
to nginx it looks like your editor uses mandatory locking and
that’s why nginx can’t open file. Versions prior to 0.8.36/0.7.66
will likely just hang in such situation waiting for file to be
released.
Note also that it’s not generally safe to edit files which are
served at the same moment (this applies to all servers, not just
nginx). Consider the following scenario:
You have a file with "A"s inside. User starts downloading a
file. Server opens it, and sends first half of the file.
You edit the file and change all "A"s to "B"s.
Server sends last half of the file.
Oops. User ends up with totally incorrect data: with half of
"A"s and half of "B"s inside.
Recommended aproach is to edit copy, and then replace served file
with atomic operation (via rename() system call, or via mv utility
which calls it).
yes , thanks for answering
i think that is because of my operation
OS: cent os 5.5
i edit the css file in windows XP, with editplus , through samba.
when i edit the file by vi in local centOS, there is no problem.
On Sat, Apr 16, 2011 at 12:12:10AM -0400, jeff14 wrote:
yes , thanks for answering
i think that is because of my operation
OS: cent os 5.5
i edit the css file in windows XP, with editplus , through samba.
when i edit the file by vi in local centOS, there is no problem.
Just for record:
I believe samba uses fcntl(F_SETLEASE) on linux (and this is what
causes EAGAIN).
Maxim D.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.