database is locked

148 views
Skip to first unread message

Pierre

unread,
Nov 24, 2015, 11:54:32 AM11/24/15
to web2py-users

Hi everyone,

I tried to unlock with  db.executesql('PRAGMA journal_mode=WAL')           <--------found that in the archives

but it is vicious and "prefers" to stay locked


help !!!!


>import sqlite3
>print sqlite3.sqlite_version
>3.8.2

Ticket ID

127.0.0.1.2015-11-24.17-39-38.f55ca936-a038-42d3-a4c3-ad1667566228

<class 'sqlite3.OperationalError'> database is locked

Version

web2py™ Version 2.12.3-stable+timestamp.2015.08.19.00.18.03

Traceback

1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
Traceback (most recent call last):
File "/opt/web2py/gluon/restricted.py", line 227, in restricted
exec ccode in environment
File "/opt/web2py/applications/proxim/controllers/appadmin.py", line 700, in <module>
File "/opt/web2py/gluon/globals.py", line 412, in <lambda>
self._caller = lambda f: f()
File "/opt/web2py/applications/proxim/controllers/appadmin.py", line 343, in update
if form.accepts(request.vars, session):
File "/opt/web2py/gluon/sqlhtml.py", line 1561, in accepts
self.table._db(qry).delete()
File "/opt/web2py/gluon/packages/dal/pydal/objects.py", line 2022, in delete
ret = db._adapter.delete(tablename,self.query)
File "/opt/web2py/gluon/packages/dal/pydal/adapters/sqlite.py", line 104, in delete
counter = super(SQLiteAdapter, self).delete(tablename, query)
File "/opt/web2py/gluon/packages/dal/pydal/adapters/base.py", line 1042, in delete
self.execute(sql)
File "/opt/web2py/gluon/packages/dal/pydal/adapters/base.py", line 1378, in execute
return self.log_execute(*a, **b)
File "/opt/web2py/gluon/packages/dal/pydal/adapters/base.py", line 1372, in log_execute
ret = self.cursor.execute(command, *a[1:], **b)
OperationalError: database is locked

Niphlod

unread,
Nov 24, 2015, 2:44:34 PM11/24/15
to web2py-users
uhm. it stays locked no matter what ? sqlite locks the entire db when writing, so make sure your app is the only one accessing the db...

Pierre

unread,
Nov 27, 2015, 9:39:24 AM11/27/15
to web2py-users
 A simple reboot and it unlocked
damned computers !!!! 



Reply all
Reply to author
Forward
0 new messages