On 3 Dec 2013, at 4:23pm, Scott Baker <bak...@canbytel.com> wrote:

> My VPS provider mounts my /home partition via NFSv3 and it's causing me
> all kinds of headaches. I have my website served from ~/html/ using
> SQLite as the DB and I'm constantly seeing hung Apache processes that
> are threads with an open connection to my SQLite DB. I've read all the
> caveats about doing PHP over NFS, and all my systems are using
> up-to-date NFS implementations (Fedora 19 and Centos 6.4).

PHP has no problem with NFS.  But SQLite has a big problem with NFS because it 
doesn't do locking properly.  See section 2.1 of:

<http://www.sqlite.org/howtocorrupt.html>

If you're attempting to do any concurrent access to a SQLite database (i.e. you 
might have to two web users changing a database at the same time) then you're 
going to run into problems.  There's no fix for this, and it's caused by NFS, 
not by anything a specific OS or PHP does.

If you're going to have a database used for web service, keep it on your web 
server itself.  I do this, my database access is done using the sqlite3 library 
of PHP on a unix web server, and I've had no locking or corruption problems 
(apart from when the hard disk had intermittent failure, which was a horror).

Simon.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to