Mirth Community

Mirth Community (http://www.mirthcorp.com/community/forums/index.php)
-   Support (http://www.mirthcorp.com/community/forums/forumdisplay.php?f=6)
-   -   Aggressive attachment pruning (http://www.mirthcorp.com/community/forums/showthread.php?t=9358)

sandersmr 09-30-2013 11:21 AM

Aggressive attachment pruning
 
So, I have two channels that use attachments for MDM documents. I used to have pruning set to run hourly, but after some issues I've changed it to daily around 1 am, to hopefully help. The issue is that pruning of the attachments table seems to be overly aggressive. When checking the process list, the CPU usage is sitting at about 95% used and I have about 8 or so postgres processes all running the same query, many running for 2+ hours:

Code:

DELETE FROM ATTACHMENT WHERE MESSAGE_ID NOT IN (SELECT ID FROM MESSAGE WHERE ATTACHMENT=TRUE UNION SELECT CORRELATION_ID FROM MESSAGE WHERE CORRELATION_ID IS NOT NULL AND ATTACHMENT=TRUE)
I realize that this is for pruning the attachments table of unneeded attachments, but from what I see, you only need one of those running, not 8+. I've tried canceling them, but they keep coming back a few minutes later.

Any suggestions? I'm using PostgreSQL 8.4 and Mirth 2.1.1.


All times are GMT -8. The time now is 07:03 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Mirth Corporation