Bug 705935
Summary: | Idle transactions kept open forever make VACUUM useless | ||
---|---|---|---|
Product: | [Community] Spacewalk | Reporter: | Andreas Rogge <a.rogge> |
Component: | Server | Assignee: | Jan Pazdziora (Red Hat) <jpazdziora> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Red Hat Satellite QA List <satqe-list> |
Severity: | high | Docs Contact: | |
Priority: | unspecified | ||
Version: | 1.4 | CC: | jpazdziora, mathieu-acct |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | osad-5.10.16-1 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2011-09-16 10:08:23 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 723481 | ||
Attachments: |
Description
Andreas Rogge
2011-05-18 22:34:03 UTC
Setting to high priority as this is somewhat like a memory leak. The database leaks diskspace until you restart the software. That's at least as bad as a memory leak. I've identified three sources of these dangling transactions. 1. osa-dispatcher 2. task-o-matic 3. the /XMLRPC handler "fixing" osa-dispatcher is simple. Adding rhnSQL.commit() calls after the two queries appearing in the main-loop makes the transactions close. As osa-dispatcher is the "bad guy" (i.e. the component that keeps transactions open for days and weeks) this already helps a lot. Created attachment 502679 [details]
Patch that adds rhnSQL.commit() into the main loop of osa-dispatcher
Please have a look at the attached patch and tell me wether that is a feasible workaround.
I can also provide a patch for git master if that helps.
Created attachment 502691 [details]
Add a rhnSQL.commit() just after self._req_processor.process()
This adds a rhnSQL.commit() just after the request has been processed.
It does not look like it is a great place for that, but it is where rhnSQL.rollback() is done in case the request threw an exception, so I guess it should be ok.
Created attachment 502711 [details]
add rhnSQL.commit() after process() to flush dangling transaction
New patch against git master
Created attachment 502712 [details]
introduce rhnSQL.commit() after the both SELECT statements that seem to be the main loop
New patch against git master
(In reply to comment #6) > Created attachment 502712 [details] > introduce rhnSQL.commit() after the both SELECT statements that seem to be the > main loop > > New patch against git master Committed to Spacewalk master as 5ac15a79d42a4a334bf162957a3de5f8c0536f50. Aligning under space16. Taking. I'm going to move this bugzilla to CLOSED CURRENTRELEASE as the osa-dispatcher patch was implemented and released. As for the apacheHandler.py patch, I am not too fond of the commit. There was more discussion about it in thread http://www.redhat.com/archives/spacewalk-devel/2011-June/msg00004.html and we will need to find out what is it that leaves the transactions behind. If we have more information or patch which would help us to find that out, please either open new bugzilla or followup in that thread. We did not have any patch for the taskomatic side -- again, if anyone comes with an investigation or patch, please file new bugzilla or post to spacewalk-devel mailing list. |