Thanks Simon and Richard. Our process can restart unexpectedly sometimes and sometimes we die so that we can come up with a new version or failover. But I am pretty sure we don't do anything specifically like closing the db before dieing.
For cases where we know we are dying, I can put statements to take care of closing the db if they are not already there(need to look). But how about the case when we unexpectedly get killed and come up again. Is there anything we can do to avoid the database locked issue? -mayank -----Original Message----- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Simon Slavin Sent: Tuesday, July 08, 2014 2:42 PM To: General Discussion of SQLite Database Subject: Re: [sqlite] Sometimes when my process restarts, it returns error "database is locked" On 8 Jul 2014, at 8:58pm, Mayank Kumar (mayankum) <mayan...@cisco.com> wrote: > We have a process with a single sqlite db and a single connection to the > database from a thread. From time to time our processs restarts Does your application close the database as part of the restart process ? Are you sure that when this happens that there are no unfinalized statements ? Are you checking the _close() call and reporting an error message if it does not return SQLITE_OK ? Simon. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users