Solving a 500 error
Maxim Dounin
mdounin at mdounin.ru
Wed Oct 2 10:55:01 UTC 2013
Hello!
On Tue, Oct 01, 2013 at 05:52:32PM +0100, Ian Hobson wrote:
> Hi All,
>
> I have an nginx install with the configuration below.
>
> The server is a linux VM running under Virtual Box on my windows
> machine. The website / directory is made available as a sharename
> using Samba, which I connect to from Windows, so I can edit the
> files. I edit in windows, using familiar tools and then test using a
> browser, usually without restarting nginx or init-fastcgi.
>
> This works fine for php files. When I edit one of two javascript
> files, the next request for a javascript file fails with a 500 error
> - even if the request is not for the changed file.
>
> The version of nginx I am running is 1.2.6 compiled with the long
> polling module included.
>
> Does anyone know what is happening?
Key points is "Samba" and "Linux". When you edit files via Samba
share, it tries to lock files with fcntl(F_GETLEASE) if running on
Linux. This in turn results in errors while opening such "locked"
files. For more information see Samba docs here:
http://www.samba.org/samba/docs/man/Samba-HOWTO-Collection/locking.html#id2616903
It's not clear why the problem happens with files you didn't
changed, but I would suppose they are at least open via Samba.
Anyway, disabling appropriate locking in Samba configuration will
likely help. See the link above for details.
--
Maxim Dounin
http://nginx.org/en/donation.html
More information about the nginx
mailing list