<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Still scratching my head.</title>
	<atom:link href="http://blog.xcski.com/2006/05/12/still-scratching-my-head/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.xcski.com/2006/05/12/still-scratching-my-head</link>
	<description>Everything I used to bore people on newsgroups and mailing lists with, now in one inconvenient place.</description>
	<pubDate>Fri, 05 Dec 2008 10:43:32 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.5</generator>
		<item>
		<title>By: Paul Tomblin</title>
		<link>http://blog.xcski.com/2006/05/12/still-scratching-my-head#comment-3474</link>
		<dc:creator>Paul Tomblin</dc:creator>
		<pubDate>Sun, 14 May 2006 13:35:22 +0000</pubDate>
		<guid isPermaLink="false">http://xcski.com/blogs/pt/2006/05/12/still-scratching-my-head#comment-3474</guid>
		<description>Richard, that's a good point.  The job that's actually freezing is just doing queries, no updates, but there are other processes going on.  But there are some other processes and one of them does some deletes from the same tables that this one is deleting.  Also, there may be a "vacuum analyze;" going on at the same time.

We're using PostgresSQL (as you might have guessed by the "vacuum analyze" thing).  I'll have to look more closely into what else might be going on in that table, and how to monitor locks.  I'm pretty sure we turned off autocommit, but we don't actually use transactions or explicit commits anywhere.  I was thinking of doing so, but I haven't figured out the best way to do this - whether to make one big transaction around major activities like "the nightly expire run" or "handle this event", or small transactions around single operations like "delete this playlist and all the schedules that rely on it".</description>
		<content:encoded><![CDATA[<p>Richard, that&#8217;s a good point.  The job that&#8217;s actually freezing is just doing queries, no updates, but there are other processes going on.  But there are some other processes and one of them does some deletes from the same tables that this one is deleting.  Also, there may be a &#8220;vacuum analyze;&#8221; going on at the same time.</p>
<p>We&#8217;re using PostgresSQL (as you might have guessed by the &#8220;vacuum analyze&#8221; thing).  I&#8217;ll have to look more closely into what else might be going on in that table, and how to monitor locks.  I&#8217;m pretty sure we turned off autocommit, but we don&#8217;t actually use transactions or explicit commits anywhere.  I was thinking of doing so, but I haven&#8217;t figured out the best way to do this - whether to make one big transaction around major activities like &#8220;the nightly expire run&#8221; or &#8220;handle this event&#8221;, or small transactions around single operations like &#8220;delete this playlist and all the schedules that rely on it&#8221;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Richard</title>
		<link>http://blog.xcski.com/2006/05/12/still-scratching-my-head#comment-3458</link>
		<dc:creator>Richard</dc:creator>
		<pubDate>Sun, 14 May 2006 08:09:51 +0000</pubDate>
		<guid isPermaLink="false">http://xcski.com/blogs/pt/2006/05/12/still-scratching-my-head#comment-3458</guid>
		<description>What are your database changes like? if you've more than one insert or update in a job can they occur in different sequences? e.g. insert from tableA followed by a delete from tableB and another job task requires an insert into tableB followed by an insert into tableA? 

What are you using as a database? can you monitor its lock activity?</description>
		<content:encoded><![CDATA[<p>What are your database changes like? if you&#8217;ve more than one insert or update in a job can they occur in different sequences? e.g. insert from tableA followed by a delete from tableB and another job task requires an insert into tableB followed by an insert into tableA? </p>
<p>What are you using as a database? can you monitor its lock activity?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tina Marie</title>
		<link>http://blog.xcski.com/2006/05/12/still-scratching-my-head#comment-3250</link>
		<dc:creator>Tina Marie</dc:creator>
		<pubDate>Fri, 12 May 2006 21:22:08 +0000</pubDate>
		<guid isPermaLink="false">http://xcski.com/blogs/pt/2006/05/12/still-scratching-my-head#comment-3250</guid>
		<description>I vote for the job queue.   If nothing else, create a thread pool, and feed it from the jobs. Everytime you get a job, check the threads.  If one is idle, give them the job. If not, check to see if any are hung, kill it, then restart it and give it the job. And so on...

We've found the best way to find lock problems is a multi-processor machine.  We've got one or two quads that get loaned out just to debug this sort of thing.</description>
		<content:encoded><![CDATA[<p>I vote for the job queue.   If nothing else, create a thread pool, and feed it from the jobs. Everytime you get a job, check the threads.  If one is idle, give them the job. If not, check to see if any are hung, kill it, then restart it and give it the job. And so on&#8230;</p>
<p>We&#8217;ve found the best way to find lock problems is a multi-processor machine.  We&#8217;ve got one or two quads that get loaned out just to debug this sort of thing.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
