home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 2
Plugin Development
SQLiteDatabase Plugin for MP2
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="MJGraf" data-source="post: 988869" data-attributes="member: 17886"><p>TVLibrary Integration shouldn't be a problem - SQLite seems to be easy to handle.</p><p></p><p>What I noticed is that while there is a big import running, I was once not able to add another share. The reason was that the thread, which tried to insert the new share into the database, was not able to acquire an exclusive share necessary for the write operation within the specified timeout of 30 sec. I'm not entirely sure where this comes from. I read somewhere that SQLite, if it is not able to acquire a lock from a different connection than the one holding the current lock, waits 1 sec until it tries again. When there is another thread (here the importer) with another connection, making heavily use of locks, the first thread only has 30 tries until the timeout is reached and a "database locked" exception is thrown. What I also read is that it is not recommended to have too many different connections to the same database. Maybe a solution is to have only one connection within the database object, which is then used for different transactions. As far as I understand, in this case the 1 s wait rule does not apply and locking is handled "internally" within the single connection. That would on the other hand require a lock within the database object with respect to the access of the single connection object.</p><p>Will try as soon as I have some more time.</p></blockquote><p></p>
[QUOTE="MJGraf, post: 988869, member: 17886"] TVLibrary Integration shouldn't be a problem - SQLite seems to be easy to handle. What I noticed is that while there is a big import running, I was once not able to add another share. The reason was that the thread, which tried to insert the new share into the database, was not able to acquire an exclusive share necessary for the write operation within the specified timeout of 30 sec. I'm not entirely sure where this comes from. I read somewhere that SQLite, if it is not able to acquire a lock from a different connection than the one holding the current lock, waits 1 sec until it tries again. When there is another thread (here the importer) with another connection, making heavily use of locks, the first thread only has 30 tries until the timeout is reached and a "database locked" exception is thrown. What I also read is that it is not recommended to have too many different connections to the same database. Maybe a solution is to have only one connection within the database object, which is then used for different transactions. As far as I understand, in this case the 1 s wait rule does not apply and locking is handled "internally" within the single connection. That would on the other hand require a lock within the database object with respect to the access of the single connection object. Will try as soon as I have some more time. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 2
Plugin Development
SQLiteDatabase Plugin for MP2
Contact us
RSS
Top
Bottom