from my experience if u running web2py on apache with mod_wsgi u will get database locked more often than running web2py alone with it's buildin webserver.
u should also avoid using session on sqlite database. On Saturday, April 6, 2013 11:14:16 PM UTC+8, BlueShadow wrote: > > I know that I will eventually have that problem. thats why I got the plan > to migrate to postgres when I got more time. the problem with postgres > migration is that I used a couple field names which you are not allowed to > use in postgres so I can't simply move the db with me thats quite a bit of > work. So I try to keep it running with SQLite until I got more time. > > On Saturday, April 6, 2013 4:51:03 PM UTC+2, Niphlod wrote: >> >> >> >> On Saturday, April 6, 2013 3:29:24 PM UTC+2, Vasile Ermicioi wrote: >>> >>> Don't really know where you saw the 100k user statement.... >>> >>> http://www.sqlite.org/whentouse.html >>> >> >> Make a simple app (even with "less bloated" frameworks) that writes to a >> db every time a user hits a page. I bet I can lock the db in no time. >> The problem is not "how many users are hitting the website" but "how many >> users are hitting the website and trying to write to the db". >> As far as read is concerned, I never had a "database locked" problem with >> SQLite, WAL active or not. >> >>> >>> editing a single table from multiple users ... no. >>> >>> with WAL enabled the response is YES! >>> >>> >> Nope. It helps for sure, but doesn't prevent locking in an "universal" >> way. >> >> Test it yourself, open one shell ... >> sqlite3 storage.db >> SQLite version 3.7.13 2012-06-11 02:05:22 >> Enter ".help" for instructions >> Enter SQL statements terminated with a ";" >> sqlite> create table m(col_a integer); >> sqlite> insert into m values(1); >> sqlite> PRAGMA journal_mode=WAL; >> wal >> sqlite> insert into m values(1); >> sqlite> select * from m >> ...> ; >> 1 >> 1 >> 3 >> ok, now open another shell >> >> sqlite3 storage.db >> SQLite version 3.7.13 2012-06-11 02:05:22 >> Enter ".help" for instructions >> Enter SQL statements terminated with a ";" >> sqlite> insert into m values(3); >> sqlite> BEGIN TRANSACTION; >> sqlite> insert into m values(3); >> sqlite> select * from m; >> 1 >> 1 >> 3 >> 3 >> sqlite> >> >> now, back to the previous one >> sqlite> insert into m values(1); >> Error: database is locked >> >> >> voilĂ , WAL active, but locked database anyway. >> >> tl;dr : You can't have an open transaction that made writes to the db and >> contemporarily read the database. >> > -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.