Return-Path: X-Original-To: apmail-manifoldcf-user-archive@www.apache.org Delivered-To: apmail-manifoldcf-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 42E46186B0 for ; Sun, 13 Dec 2015 23:03:52 +0000 (UTC) Received: (qmail 37714 invoked by uid 500); 13 Dec 2015 23:03:52 -0000 Delivered-To: apmail-manifoldcf-user-archive@manifoldcf.apache.org Received: (qmail 37658 invoked by uid 500); 13 Dec 2015 23:03:52 -0000 Mailing-List: contact user-help@manifoldcf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@manifoldcf.apache.org Delivered-To: mailing list user@manifoldcf.apache.org Received: (qmail 37648 invoked by uid 99); 13 Dec 2015 23:03:52 -0000 Received: from Unknown (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 13 Dec 2015 23:03:52 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id A063718047A for ; Sun, 13 Dec 2015 23:03:51 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.898 X-Spam-Level: ** X-Spam-Status: No, score=2.898 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=3, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-us-west.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id fPXMb7KIpuQo for ; Sun, 13 Dec 2015 23:03:50 +0000 (UTC) Received: from mail-io0-f181.google.com (mail-io0-f181.google.com [209.85.223.181]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with ESMTPS id 750B5251C6 for ; Sun, 13 Dec 2015 23:03:50 +0000 (UTC) Received: by iofo67 with SMTP id o67so26489664iof.3 for ; Sun, 13 Dec 2015 15:03:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=U11JTzdLomlz/URrsAxkvVqmTHGdRYjzf3BlACFOalg=; b=x0Ft9vHjNoRElnc9O2IRa1gbgoK15BeybkXUzi75u84LwhrJK7UAUSjVV5P0Zsuggl BVVod1aZAX4F0yi9Y47WI4mhxldZ2XNTIyyZrcGsLaQjeVVAeTYxTiJjN04bON0GDMF/ ZrBnAknlm9AVe1s0vdQyT7hF34Zt0JmwV++8ejnqMCiRDwbU2s7qpKN7OP2/w2nzK8rm DiBjJLlDsgZ94k1GwlrSOPhWy2cNTXtCM+Sdc51GUBLBIoTumTUR2siUhlECT3HLDS6t CFu0RLHKmxGyP0X2c3x/wj7ZEu1VF/H2Pk21G152r0/Ej3T1AgoKdwWdKgjoZCFoUV5c EnnA== MIME-Version: 1.0 X-Received: by 10.107.34.199 with SMTP id i190mr27740893ioi.150.1450047824271; Sun, 13 Dec 2015 15:03:44 -0800 (PST) Received: by 10.107.4.69 with HTTP; Sun, 13 Dec 2015 15:03:44 -0800 (PST) In-Reply-To: References: Date: Sun, 13 Dec 2015 18:03:44 -0500 Message-ID: Subject: Re: OutOfMemoryError on email notifications From: Karl Wright To: "user@manifoldcf.apache.org" Content-Type: multipart/alternative; boundary=001a1140d944791f200526cf91fc --001a1140d944791f200526cf91fc Content-Type: text/plain; charset=UTF-8 thanks, I'll commit a fix shortly. Karl On Sun, Dec 13, 2015 at 5:55 PM, Markus Schuch wrote: > Hi, > > i just tried the relatively new email notification feature with version > 2.2 and keep running into an OOME when notifications are about to be sent: > > agents process ran out of memory - shutting down > java.lang.OutOfMemoryError: Java heap space > at java.util.Arrays.copyOf(Unknown Source) > at java.util.Arrays.copyOf(Unknown Source) > at java.util.ArrayList.grow(Unknown Source) > at java.util.ArrayList.ensureExplicitCapacity(Unknown Source) > at java.util.ArrayList.ensureCapacityInternal(Unknown Source) > at java.util.ArrayList.add(Unknown Source) > at > org.apache.manifoldcf.crawler.notifications.email.EmailConnector.sendMail(EmailConnector.java:301) > at > org.apache.manifoldcf.crawler.notifications.email.EmailConnector.notifyOfJobEnd(EmailConnector.java:270) > at > org.apache.manifoldcf.crawler.system.JobResetThread.doEndNotifications(JobResetThread.java:260) > at > org.apache.manifoldcf.crawler.system.JobResetThread.run(JobResetThread.java:123) > > Looked into the code > There is a never incrementing for loop (copy&paste bug, loop runs over j > and increments i) at EmailConnector.java in line 298: > > for (int j = 0; j < childNode.getChildCount(); i++) { > > Regards, > Markus > --001a1140d944791f200526cf91fc Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
thanks, I'll commit a fix shortly.
Karl
=

O= n Sun, Dec 13, 2015 at 5:55 PM, Markus Schuch <markus_schuch@web.de= > wrote:
Hi,

i just tried the relatively new email notification feature with version 2.2= and keep running into an OOME when notifications are about to be sent:

agents process ran out of memory - shutting down
java.lang.OutOfMemoryError: Java heap space
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at java.util.Arrays.copyOf(Unkno= wn Source)
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at java.util.Arrays.copyOf(Unkno= wn Source)
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at java.util.ArrayList.grow(Unkn= own Source)
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at java.util.ArrayList.ensureExp= licitCapacity(Unknown Source)
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at java.util.ArrayList.ensureCap= acityInternal(Unknown Source)
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at java.util.ArrayList.add(Unkno= wn Source)
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.apache.manifoldcf.crawler= .notifications.email.EmailConnector.sendMail(EmailConnector.java:301)
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.apache.manifoldcf.crawler= .notifications.email.EmailConnector.notifyOfJobEnd(EmailConnector.java:270)=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.apache.manifoldcf.crawler= .system.JobResetThread.doEndNotifications(JobResetThread.java:260)
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.apache.manifoldcf.crawler= .system.JobResetThread.run(JobResetThread.java:123)

Looked into the code
There is a never incrementing for loop (copy&paste bug, loop runs over = j and increments i) at EmailConnector.java in line 298:

=C2=A0 =C2=A0 for (int j =3D 0; j < childNode.getChildCount(); i++) {
Regards,
Markus

--001a1140d944791f200526cf91fc--