Ticket #210 (closed defect: fixed)

Opened 6 months ago

Last modified 4 months ago

update-daemon does not close transaction

Reported by: trac-user Assigned to: fox
Priority: minor Milestone: 1.2.26
Component: database Version: 1.2.23
Keywords: Cc: emme@emmes-world.de

Description

I increased my postgresql-8.3 loglevel a few days ago (for other purposes), and I'm seeing lots of these messages:

WARNING: there is already a transaction in progress

They come from the update-daemon, as they appear every 30 minutes (I have configured the daemon to this interval).

Martin Emrich <emme@emmes-world.de>

Change History

05/26/08 00:13:23 changed by fox

It would be great if you provided more information - e.g. you probably have query log enabled too, right? The entire section between BEGIN and (what probably is) lack of COMMIT would be wonderful.

05/31/08 13:09:19 changed by trac-user

  • cc set to emme@emmes-world.de.

Hmm, somehow trac removed me from the CC: list, I just saw your reply when I checked the ticket manually in my browser. I don't have the full query log on, but I'll do now.

Ciao

Martin

05/31/08 13:40:00 changed by trac-user

Here is a snippet from the postgresql log file with query log enabled:

ttrss@ttrss (TID:0) LOG:  statement: BEGIN
ttrss@ttrss (TID:0) LOG:  statement: COMMIT
ttrss@ttrss (TID:0) LOG:  statement: SELECT 
				value,ttrss_prefs_types.type_name as type_name 
				FROM 
					ttrss_user_prefs,ttrss_prefs,ttrss_prefs_types
				WHERE 
					ttrss_user_prefs.pref_name = 'BLACKLISTED_TAGS' AND 
					ttrss_prefs_types.id = type_id AND
					owner_uid = '1' AND
					ttrss_user_prefs.pref_name = ttrss_prefs.pref_name
ttrss@ttrss (TID:0) LOG:  statement: SELECT id FROM	ttrss_entries 
						WHERE guid = 'http://www.wunschliste.de/links.pl?s=8103'
ttrss@ttrss (TID:0) LOG:  statement: BEGIN
ttrss@ttrss (TID:0) LOG:  statement: INSERT INTO ttrss_entries 
								(title,
								guid,
								link,
								updated,
								content,
								content_hash,
								no_orig_date,
								date_entered,
								comments,
								num_comments,
								author)
							VALUES
								('31.5. (Sa): Delfy (Delfy and His Friends) 7.45 Uhr', 
								'http://www.wunschliste.de/links.pl?s=8103', 
								'http://www.wunschliste.de/links.pl?s=8103',
								'2008/05/31 11:31:31', 
								'Delfy: Premiere Start (Pay-TV), am 31.05.', 
								'SHA1:5f40d9ff49134a62d7a217d2a9f8233af97b2c11',
								true, 
								NOW(), 
								'',
								'0',
								'')
ttrss@ttrss (TID:2443012) LOG:  statement: SELECT 
							id,content_hash,no_orig_date,title,
							SUBSTRING_FOR_DATE(date_entered,1,19) as date_entered,
							SUBSTRING_FOR_DATE(updated,1,19) as updated,
							num_comments
						FROM 
							ttrss_entries 
						WHERE guid = 'http://www.wunschliste.de/links.pl?s=8103'
ttrss@ttrss (TID:2443012) LOG:  statement: SELECT 
				value,ttrss_prefs_types.type_name as type_name 
				FROM 
					ttrss_user_prefs,ttrss_prefs,ttrss_prefs_types
				WHERE 
					ttrss_user_prefs.pref_name = 'ALLOW_DUPLICATE_POSTS' AND 
					ttrss_prefs_types.id = type_id AND
					owner_uid = '1' AND
					ttrss_user_prefs.pref_name = ttrss_prefs.pref_name
ttrss@ttrss (TID:2443012) LOG:  statement: SELECT id FROM	ttrss_entries 
						WHERE guid = 'http://www.wunschliste.de/links.pl?s=8103'
ttrss@ttrss (TID:2443012) LOG:  statement: BEGIN
ttrss@ttrss (TID:2443012) WARNING:  there is already a transaction in progress
ttrss@ttrss (TID:2443012) STATEMENT:  BEGIN
ttrss@ttrss (TID:2443012) LOG:  statement: UPDATE ttrss_entries SET date_entered = NOW()
							WHERE id = '314431'
ttrss@ttrss (TID:2443012) LOG:  statement: SELECT 
							id,content_hash,no_orig_date,title,
							SUBSTRING_FOR_DATE(date_entered,1,19) as date_entered,
							SUBSTRING_FOR_DATE(updated,1,19) as updated,
							num_comments
						FROM 
							ttrss_entries 
						WHERE guid = 'http://www.wunschliste.de/links.pl?s=8103'
ttrss@ttrss (TID:2443012) LOG:  statement: SELECT 
				value,ttrss_prefs_types.type_name as type_name 
				FROM 
					ttrss_user_prefs,ttrss_prefs,ttrss_prefs_types
				WHERE 
					ttrss_user_prefs.pref_name = 'ALLOW_DUPLICATE_POSTS' AND 
					ttrss_prefs_types.id = type_id AND
					owner_uid = '1' AND
					ttrss_user_prefs.pref_name = ttrss_prefs.pref_name
ttrss@ttrss (TID:2443012) LOG:  statement: SELECT id FROM	ttrss_entries 
						WHERE guid = 'http://www.wunschliste.de/links.pl?s=10479'
ttrss@ttrss (TID:2443012) LOG:  statement: BEGIN
ttrss@ttrss (TID:2443012) WARNING:  there is already a transaction in progress
ttrss@ttrss (TID:2443012) STATEMENT:  BEGIN

06/04/08 21:07:11 changed by fox

  • status changed from new to assigned.
  • milestone set to 1.2.24.

Do you have any filters defined? I found one case when the transaction wasn't properly closed if the article was filtered out. I don't see any more possible reasons, though.

I'll fix what I found in trunk.

06/04/08 21:18:01 changed by trac-user

Yes, I have one filter defined. When 1.2.24 is out, I'll try it out and look at the logs.

Martin

06/04/08 21:30:29 changed by www-ttrss

(In [2531]) [project @ update_rss_feed: properly close transaction when bailing out on filtered article (refs #210)]

08/01/08 11:51:37 changed by fox

  • status changed from assigned to closed.
  • resolution set to fixed.

OK, this one is closed until further info. I couldn't find any other unclosed begin-commit blocks in the daemon loop.