Re: [sqlite] [EXTERNAL] "Database is locked" in diagnostic tools C#

2018-02-16 Thread Wojciech Slabik (Voitec)
Thank you for your answer.

I am currently using connection time pooling using " Pooling=True; Min Pool 
Size=1; Max Pool Size=100;". The timeout is set to 30 seconds and none of the 
operations should take more than a second..
It is confusing as in a demo project I do get an exception showing after 30 
seconds (start a transaction in one thread, then sleep for >30 seconds while 
transaction in other thread is waiting and throwing exception after 30 
seconds). In this case I can only see Program Output in Diagnostic Tools.

Regards,
Wojciech

-Original Message-
From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On 
Behalf Of Hick Gunter
Sent: Friday, 16 February 2018 5:36 PM
To: 'SQLite mailing list' <sqlite-users@mailinglists.sqlite.org>
Subject: Re: [sqlite] [EXTERNAL] "Database is locked" in diagnostic tools C#

The "database is locked" message means that the transaction was unable to 
complete within the designated busy timeout and was therefore rolled back. 
Getting this message implies that you are running multiple processes. Depending 
on the journal mode, a writer process may block both readers and writers and 
vice versa (readers never block readers); or for WAL mode, a writer process 
only blocks other writers.

In any case, you need to set a sufficiently large timeout value OR establish a 
busy handler to deal with the situation. Try to keep transactions small; maybe 
you are beginning a transaction and never ending (commit/rollback) it?

What do you mean by "connection pooling"? Are you using the same connection 
from multiple threads?

-Ursprüngliche Nachricht-
Von: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] Im 
Auftrag von Wojciech Slabik (Voitec)
Gesendet: Freitag, 16. Februar 2018 10:17
An: sqlite-users@mailinglists.sqlite.org
Betreff: [EXTERNAL] [sqlite] "Database is locked" in diagnostic tools C#

Hi everyone,

I have managed  to successfully replace SQLCE with System.Data.SQLite in a 
mid-size application. Everything works fine but now that I started optimizing 
the old code and replaced own connection pooling with SQLite connection pooling 
I am getting an occasional Program Output "Database is locked" from the C++ dll 
being displayed in the VS Diagnostic Tools. This is not throwing an exception 
in C# though, so I am wondering if this just means that the transaction has 
slept and was re-executed successfully? I tried to replicate this issue in a 
small app but transaction just waits 30 seconds (default busy timeout?) and 
throws an exception, there is nothing showing up in the Diagnostic Tools.

Thanks in advance,
Wojciech

[Micromine PL]<http://www.micromine.com>

Micromine PL
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


___
 Gunter Hick | Software Engineer | Scientific Games International GmbH | 
Klitschgasse 2-4, A-1130 Vienna | FN 157284 a, HG Wien, DVR: 0430013 | (O) +43 
1 80100 - 0

May be privileged. May be confidential. Please delete if not the addressee.
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] "Database is locked" in diagnostic tools C#

2018-02-16 Thread Wojciech Slabik (Voitec)
Hi everyone,

I have managed  to successfully replace SQLCE with System.Data.SQLite in a 
mid-size application. Everything works fine but now that I started optimizing 
the old code and replaced own connection pooling with SQLite connection pooling 
I am getting an occasional Program Output "Database is locked" from the C++ dll 
being displayed in the VS Diagnostic Tools. This is not throwing an exception 
in C# though, so I am wondering if this just means that the transaction has 
slept and was re-executed successfully? I tried to replicate this issue in a 
small app but transaction just waits 30 seconds (default busy timeout?) and 
throws an exception, there is nothing showing up in the Diagnostic Tools.

Thanks in advance,
Wojciech

[Micromine PL]<http://www.micromine.com>

Micromine PL
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Date and time in RFC 822

2008-07-08 Thread Wojciech
Hi,

I would ask, if there is any possibility to sort data in sqlite tables by
date, which is stores in RFC 822 format. I have data in this format, which
comes from RSS channels - in RSS specification RFC 822 it's required.

Sample date looks like that: Sat, 07 Sep 2002 00:00:01 GMT

I tried with something like 

SELECT MAX(date(date_field)) FROM table

...but it isn't working. I readed
http://www.sqlite.org/cvstrac/wiki?p=DateAndTimeFunctions and searched a
couple of web resources, but I didn't find any working solution.

Thank You kindly for any help,

WK


___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Malformed database schema

2008-02-15 Thread Wojciech Kocjan
Hello,

I'm not experienced user of SQLite and i have small problem with my 
database. I'm using SQLite database for my website (through PHP PDO).

On remote Server everything is OK. I'm using:

sqlite3 database.db

and after '.tables' command I see all tables.

Problems are on localhost:

sqlite3 database.db
SQLite version 3.4.2
Enter ".help" for instructions
sqlite> .tables
Error: malformed database schema - near "STATEMENT": syntax error

Database.db it's of course the same file. I suppose problem is with 
different SQLite versions. On remote host it's 3.2.1 and on my 
localhost: 3.4.2.

database.db was firstly 2.8 SQLITE database. A couple months ago I made 
migration by typing:

sqlite old_database.db .dump | sqlite3 database.db

Do I have to make anything like that again? I mean: migration from 3.2 
to 3.4?


Thank You for help.


-- 
Best Regards

Wojciech Kocjan
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users