# Nginx internal server errors static files first load only?

**URL:** <https://www.ruby-forum.com/t/nginx-internal-server-errors-static-files-first-load-only/236012>\
**Category:** NGINX\
**Created:** [July 30, 2013, 9:18pm UTC](https://www.ruby-forum.com/t/nginx-internal-server-errors-static-files-first-load-only/236012 "2013-07-30T21:18:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![addis\_a](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/c4cdca/32.png) [@addis\_a](https://www.ruby-forum.com/u/addis_a)\
**Post date:** [July 30, 2013, 9:18pm UTC](https://www.ruby-forum.com/t/nginx-internal-server-errors-static-files-first-load-only/236012/1 "2013-07-30T21:18:25Z")

</div>

Hi Guys,

Got a strange issue happening, I do my coding on Windows 8 x64 using  
Sublime  
Text 2.0.2, my sites run of a Ubuntu 13.04 VirtualBox guest over a  
bridged  
adaptor connection.

Weird thing happens, if I save a static file (HTML, CSS etc) from  
Sublime on  
Windows to my Ubuntu vm and load it I get a 500 internal error (generic  
nginx one), hit refresh and all is well. However, If I do the same from  
Notepad++ I get no issues at all, the file will load first time on  
nginx.

Both are set for EOL unix and UTF-8 and even changing this on both seems  
to  
bring the same issue? The nginx error log is vague, just saying its  
temporarily unavailable.

I’ve posted this on the sublime forum too, as it seems to be sumin that  
is  
doing with the file upon saving? Even saving a .html in plain old  
notepad is  
fine.

Does anyone have any ideas what this could be? How I can solve it? Or  
even  
find out more info on why nginx does like the file first time round?

Also worth mentioning that no such issue occurs with Apache, that serves  
all  
files?

Any help appreciated!

Thanks

Posted at Nginx Forum:

> **[Nginx internal server errors static files first load only?](https://forum.nginx.org/read.php?2,241387,241387#msg-241387)**
>
> Hi Guys, Got a strange issue happening, I do my coding on Windows 8 x64 using Sublime Text 2.0.2, my sites run of a Ubuntu 13.04 VirtualBox guest over a bridged adaptor connection. Weird thing happens, if I save a static file (HTML, CSS etc) from...

---

<div class="post-metadata">

**Author:** ![keogh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/6bbea6/32.png) [@keogh](https://www.ruby-forum.com/u/keogh)\
**Post date:** [July 30, 2013, 9:20pm UTC](https://www.ruby-forum.com/t/nginx-internal-server-errors-static-files-first-load-only/236012/2 "2013-07-30T21:20:45Z")

</div>

To clarify above, when I say I change the EOL and encoding on both  
sublime  
and notepad++ nothing changes. If notepad++ is windows EOL and ANSI it  
is  
still fine loading first time, no matter what I set sublime too it’s  
always  
failing first load

Posted at Nginx Forum:

> **[Re: Nginx internal server errors static files first load only?](https://forum.nginx.org/read.php?2,241387,241388#msg-241388)**
>
> Hi Guys, Got a strange issue happening, I do my coding on Windows 8 x64 using Sublime Text 2.0.2, my sites run of a Ubuntu 13.04 VirtualBox guest over a bridged adaptor connection. Weird thing happens, if I save a static file (HTML, CSS etc) from...

---

<div class="post-metadata">

**Author:** ![keogh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/6bbea6/32.png) [@keogh](https://www.ruby-forum.com/u/keogh)\
**Post date:** [July 30, 2013, 11:26pm UTC](https://www.ruby-forum.com/t/nginx-internal-server-errors-static-files-first-load-only/236012/3 "2013-07-30T23:26:23Z")

</div>

This can be ignored now, I’ve found the issue. It was samba locking the  
file, adding “oplocks = no” to my smb.conf solved the problem.

Thanks

Posted at Nginx Forum:

> **[Re: Nginx internal server errors static files first load only?](https://forum.nginx.org/read.php?2,241387,241389#msg-241389)**
>
> Hi Guys, Got a strange issue happening, I do my coding on Windows 8 x64 using Sublime Text 2.0.2, my sites run of a Ubuntu 13.04 VirtualBox guest over a bridged adaptor connection. Weird thing happens, if I save a static file (HTML, CSS etc) from...
