# Resource temporarily unavailable with css file

**URL:** <https://www.ruby-forum.com/t/resource-temporarily-unavailable-with-css-file/205720>\
**Category:** NGINX\
**Created:** [April 14, 2011, 6:47am UTC](https://www.ruby-forum.com/t/resource-temporarily-unavailable-with-css-file/205720 "2011-04-14T06:47:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dubstep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cdc98d/32.png) [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Post date:** [April 14, 2011, 6:47am UTC](https://www.ruby-forum.com/t/resource-temporarily-unavailable-with-css-file/205720/1 "2011-04-14T06:47:14Z")

</div>

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](http://my.test.com)”, referrer: “[http://my.test.com/](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

Posted at Nginx Forum:

> **[Resource temporarily unavailable with css file](https://forum.nginx.org/read.php?2,191155,191155#msg-191155)**
>
> 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...

---

<div class="post-metadata">

**Author:** ![jeff14](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/a698b9/32.png) [@jeff14](https://www.ruby-forum.com/u/jeff14)\
**Post date:** [April 14, 2011, 1:01pm UTC](https://www.ruby-forum.com/t/resource-temporarily-unavailable-with-css-file/205720/2 "2011-04-14T13:01:33Z")

</div>

Hello!

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](http://my.test.com)”, referrer: “[http://my.test.com/](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 D.

---

<div class="post-metadata">

**Author:** ![jeff14](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/a698b9/32.png) [@jeff14](https://www.ruby-forum.com/u/jeff14)\
**Post date:** [April 16, 2011, 6:12am UTC](https://www.ruby-forum.com/t/resource-temporarily-unavailable-with-css-file/205720/3 "2011-04-16T06:12:32Z")

</div>

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.

Posted at Nginx Forum:

> **[Re: Resource temporarily unavailable with css file](https://forum.nginx.org/read.php?2,191155,191648#msg-191648)**
>
> 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...

---

<div class="post-metadata">

**Author:** ![jeff14](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/a698b9/32.png) [@jeff14](https://www.ruby-forum.com/u/jeff14)\
**Post date:** [April 16, 2011, 1:33pm UTC](https://www.ruby-forum.com/t/resource-temporarily-unavailable-with-css-file/205720/4 "2011-04-16T13:33:44Z")

</div>

Hello!

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.
