Hi all, I'm currently developing a little django application for monitoring workstations. Each monitored host reports its own data by creating an object in django db. It can obviously occur that several workstations try to access the db at the same time. And I commonly get the following error (using the SQLite backend):
Traceback (most recent call last): File "/home/lw/localWatch/collect/collect.py", line 168, in ? h.save() File "/home/lw/django/django/db/models/base.py", line 166, in save db_values + [pk_val]) File "/home/lw/django/django/db/backends/util.py", line 12, in execute return self.cursor.execute(sql, params) File "/home/lw/django/django/db/backends/sqlite3/base.py", line 69, in execute return Database.Cursor.execute(self, query, params) pysqlite2.dbapi2.OperationalError: unable to open database file When I manually launch my application, on only one host, there's no error, and the script correctly completes. I thought that SQLite gracefully handled concurrent accesses, so I wonder why I get these errors. Is there a way to tune framework locks on the database, to change retry limits, or something else, to avoid this? Thanks in advance, -- Kilian CAVALOTTI Administrateur réseaux et systèmes UPMC / CNRS - LIP6 (C870) 8, rue du Capitaine Scott Tel. : 01 44 27 88 54 75015 Paris - France Fax. : 01 44 27 70 00 X-Google-Language: ENGLISH,UTF8 Received: by 10.54.131.14 with SMTP id e14mr171543wrd; Sun, 21 May 2006 09:25:00 -0700 (PDT) Return-Path: <[EMAIL PROTECTED]> Received: from smtp.jknet.org (kick.jknet.org [82.231.159.30]) by mx.googlegroups.com with ESMTP id v23si708467cwb.2006.05.21.09.24.59; Sun, 21 May 2006 09:25:00 -0700 (PDT) Received-SPF: neutral (googlegroups.com: 82.231.159.30 is neither permitted nor denied by best guess record for domain of [EMAIL PROTECTED]) Received: from spip.jknet.org (spip.jknet.org [192.168.0.8]) by smtp.jknet.org (Postfix) with ESMTP id 64F62767B3 for <django-users@googlegroups.com>; Sun, 21 May 2006 18:24:58 +0200 (CEST) From: Kilian CAVALOTTI <[EMAIL PROTECTED]> Organization: LIP6 To: django-users@googlegroups.com Subject: SQLite concurrent access to database Date: Sun, 21 May 2006 18:25:01 +0200 User-Agent: KMail/1.9.1 Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Message-Id: <[EMAIL PROTECTED]> Hi all, I'm currently developing a little django application for monitoring workstations. Each monitored host reports its own data by creating an object in django db. It can obviously occur that several workstations try to access the db at the same time. And I commonly get the following error (using the SQLite backend): Traceback (most recent call last): File "/home/lw/localWatch/collect/collect.py", line 168, in ? h.save() File "/home/lw/django/django/db/models/base.py", line 166, in save db_values + [pk_val]) File "/home/lw/django/django/db/backends/util.py", line 12, in execute return self.cursor.execute(sql, params) File "/home/lw/django/django/db/backends/sqlite3/base.py", line 69, in execute return Database.Cursor.execute(self, query, params) pysqlite2.dbapi2.OperationalError: unable to open database file When I manually launch my application, on only one host, there's no error, and the script correctly completes. I thought that SQLite gracefully handled concurrent accesses, so I wonder why I get these errors. Is there a way to tune framework locks on the database, to change retry limits, or something else, to avoid this? Thanks in advance, -- Kilian CAVALOTTI Administrateur réseaux et systèmes UPMC / CNRS - LIP6 (C870) 8, rue du Capitaine Scott Tel. : 01 44 27 88 54 75015 Paris - France Fax. : 01 44 27 70 00 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~----------~----~----~----~------~----~------~--~---