Rohit Kaushal wrote:
> My application starts properly and works fine for about 15 mins. During
> this time, the database is created/opened, updated and then closed. The
> frequency of this update is about 1 sec. Then suddenly the database becomes
> inaccessible with sqlite3_open_v2 returning error code 14 for reasons
> unknown to me right now.

That the ~900th open fails might indicate that you are running out of
file handles.

> I make calls to following code fragments whenever an operation on database
> is required :
>
> void open_db()
> {
> ...
> rc = sqlite3_open_v2("mydb.db", &db,SQLITE_OPEN_CREATE | 
> SQLITE_OPEN_READWRITE, NULL);
> ...
> }

Why are you opening the database every time?  Just keep it open as long
as your program is running.

> void close_db()
> {
> sqlite3_close(db);
> }

Do you have evidence that this function is actually called, and with the
correct db pointer?


Regards,
Clemens
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to