<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Armswiper.co.uk &#187; SQLite</title>
	<atom:link href="http://www.armswiper.co.uk/blog/view/tag/sqlite/feed" rel="self" type="application/rss+xml" />
	<link>http://www.armswiper.co.uk</link>
	<description>Developer, Rower, Funny Man</description>
	<lastBuildDate>Thu, 07 Apr 2011 19:18:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>SQLite Concurrency</title>
		<link>http://www.armswiper.co.uk/blog/view/474</link>
		<comments>http://www.armswiper.co.uk/blog/view/474#comments</comments>
		<pubDate>Sat, 11 Apr 2009 19:54:05 +0000</pubDate>
		<dc:creator>Mark</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[SQLite]]></category>

		<guid isPermaLink="false">http://www.armswiper.co.uk/?p=474</guid>
		<description><![CDATA[Recently, I wrote an application that used a SQLite database and wrote data into a common database rapidly, over several connections. I initially wrote the application to use one thread, and only one database connection, but as I improved the software, I converted it to use multiple threads with one connection per thread. I quickly [...]]]></description>
			<content:encoded><![CDATA[<p>Recently, I wrote an application that used a SQLite database and wrote data into a common database rapidly, over several connections.</p>
<p>I initially wrote the application to use one thread, and only one database connection, but as I improved the software, I converted it to use multiple threads with one connection per thread.</p>
<p>I quickly ran into the problem though that the database quickly became locked &#8211; one thread would block out the other and would not return the lock. It wasn&#8217;t consistent though as to which thread would be blocked &#8211; it was usually the second thread, but not consistently.</p>
<p>Having read a <a href="http://itsystementwicklung.de/pipermail/list-pysqlite/2009-April/000380.html">post from the pysqlite mailing list</a>, I think it explains the problem a little bit more accurately, and kind of exaplins a solution. Although, it does seem a little bit drastic (essentially, reconnect everytime you need to run a concurrent query).</p>
<p>I&#8217;m now very interested to find out whether this will cure my problem. It does seem a bit drastic, and quite IO intensive, but it&#8217;s worth a shot!</p>
<p>I&#8217;ll let you know my mileage&#8230;.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.armswiper.co.uk/blog/view/474/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
