Author: jmssiera
Date: Wed Mar 16 13:49:56 2022
New Revision: 1898966
URL: http://svn.apache.org/viewvc?rev=1898966&view=rev
Log:
Fix CONNECTORS-1701: Add date info on OOM Error in WorkerThread
Modified:
manifoldcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/WorkerThread.java
Modified:
manifoldcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/WorkerThread.java
URL:
http://svn.apache.org/viewvc/manifoldcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/WorkerThread.java?rev=1898966&r1=1898965&r2=1898966&view=diff
==============================================================================
---
manifoldcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/WorkerThread.java
(original)
+++
manifoldcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/WorkerThread.java
Wed Mar 16 13:49:56 2022
@@ -25,6 +25,7 @@ import org.apache.manifoldcf.core.util.U
import java.util.*;
import java.io.*;
import java.lang.reflect.*;
+import java.text.SimpleDateFormat;
/** This class represents a worker thread. Hundreds of these threads are
instantiated in order to
* perform crawling and extraction.
@@ -45,6 +46,8 @@ public class WorkerThread extends Thread
protected final QueueTracker queueTracker;
/** Process ID */
protected final String processID;
+
+ private static final SimpleDateFormat sdf = new
SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss,SSS");
/** Constructor.
*@param id is the worker thread id.
@@ -846,7 +849,7 @@ public class WorkerThread extends Thread
}
catch (OutOfMemoryError e)
{
- System.err.println("agents process ran out of memory - shutting
down");
+ System.err.println(sdf.format(new Date()) + " agents process ran
out of memory - shutting down");
e.printStackTrace(System.err);
ManifoldCF.systemExit(-200);
}