Welcome! Log In Create A New Profile

Advanced

Re: Resource temporarily unavailable with css file

Maxim Dounin
April 14, 2011 07:02AM
Hello!

On Thu, Apr 14, 2011 at 12:46:24AM -0400, jeff14 wrote:

> 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.
> 1. i open this web page, this is ok
> 2. i change some content of myCss.css.
> 3. 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/"
> 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:

1. You have a file with "A"s inside. User starts downloading a
file. Server opens it, and sends first half of the file.

2. You edit the file and change all "A"s to "B"s.

3. Server sends last half of the file.

4. 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).

Maxim Dounin

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

Resource temporarily unavailable with css file

jeff14 April 14, 2011 12:46AM

Re: Resource temporarily unavailable with css file

Maxim Dounin April 14, 2011 07:02AM

Re: Resource temporarily unavailable with css file

jeff14 April 16, 2011 12:12AM

Re: Resource temporarily unavailable with css file

Maxim Dounin April 16, 2011 07:34AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 247
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready