From dev-return-30171-apmail-jackrabbit-dev-archive=jackrabbit.apache.org@jackrabbit.apache.org Tue Dec 07 12:44:35 2010 Return-Path: Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: (qmail 18382 invoked from network); 7 Dec 2010 12:44:35 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 7 Dec 2010 12:44:35 -0000 Received: (qmail 15550 invoked by uid 500); 7 Dec 2010 12:44:34 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 15312 invoked by uid 500); 7 Dec 2010 12:44:34 -0000 Mailing-List: contact dev-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jackrabbit.apache.org Delivered-To: mailing list dev@jackrabbit.apache.org Received: (qmail 15302 invoked by uid 99); 7 Dec 2010 12:44:33 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Dec 2010 12:44:33 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Dec 2010 12:44:30 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id oB7Ci9d5023223 for ; Tue, 7 Dec 2010 12:44:09 GMT Message-ID: <5777028.22701291725849023.JavaMail.jira@thor> Date: Tue, 7 Dec 2010 07:44:09 -0500 (EST) From: "Omid Milani (JIRA)" To: dev@jackrabbit.apache.org Subject: [jira] Updated: (JCR-2832) Crash when adding node to cluster with big journal on PSQL DB In-Reply-To: <20121173.22611291725009381.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/JCR-2832?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Omid Milani updated JCR-2832: ----------------------------- Attachment: jackrabbit-cluster-outofmem.patch The way I solved this, but it's not very clean and possibly can cause side effects. batchMode on connHelper is required to connect to PSQL in transactional mode, this can cause problem if DatabaseJournal.conHelper is used meanwhile for writing to DB. Then, there's explicit specification of fetchMode in ConnectionHelper.reallyExec, which would be called for all database interactions, I couldn't find a better way to just call it for connection used for doSync. It seems harmless, but I'm not sure, also the size I have used (10000) may not be the best. > Crash when adding node to cluster with big journal on PSQL DB > ------------------------------------------------------------- > > Key: JCR-2832 > URL: https://issues.apache.org/jira/browse/JCR-2832 > Project: Jackrabbit Content Repository > Issue Type: Bug > Components: clustering, jackrabbit-core > Affects Versions: 2.1.2 > Environment: Clustering with database journal using PSQL > Reporter: Omid Milani > Fix For: 2.1.3 > > Attachments: jackrabbit-cluster-outofmem.patch > > Original Estimate: 1h > Remaining Estimate: 1h > > When adding a new node to a cluster with big journal on PSQL database application runs out of memory on the new node and crashes (no exception, application exits with code 137). > It's because with PSQL, when no fetchSize is specified, all the results of query are loaded into memory before being passed to application. Furthermore, specification of fetchSize only works in transactional mode and have no effect if autoCommit is true. (these are configured in ConnectionHelper) -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.