RE: Question about Tomcat memory leaks

2008-04-12 Thread Christophe Pierret
Hi Guenter,
You could have a look at:
http://wiki.apache.org/tomcat/FAQ/Memory
But since you describe "server" memory exhaustion, you should use Windows 
perfmon tool to log process memory (see  HOW TO: Create and Configure 
Performance Monitor Trace Logs, http://support.microsoft.com/?kbid=302552 ) and 
determine which process is leaking.  If this is tomcat, then start by reducing 
-Xmx option to a level that the server can handle (and not crash).
And finally, use the very good suggestions of others to use a java memory 
profiler.

Regards,
Christophe

-Message d'origine-
De : Guenter Knauf [mailto:[EMAIL PROTECTED] 
Envoyé : vendredi 11 avril 2008 14:18
À : dev@tomcat.apache.org
Objet : Question about Tomcat memory leaks

Hi all,
I've a prob with a Tomcat application.
This is an app which was bought by a customer which I work for.
The app runs on a plain WinXP box with nothing else installed on it but only 
the Tomcat servive + MySQL server. The app is used through the standalone http 
connector; Tomcat version is 5.5.25.
Now since few days the box tends to crash with all memory exhausted...
I cant tell at the moment if any component of the involved software packages 
was updated recently.
Now my question is: can someone give me some hints how I can observe the memory 
consumption of Tomcat to see if there might be a leak either in Tomcat self 
(saw some BZ, and ChangeLog entries that something was fixed with 5.5.26), or 
also with their app?

thanks in advance for any suggestions!

greets, Guen.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r647477 - /tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/tcp/SimpleTcpCluster.java

2008-04-12 Thread rjung
Author: rjung
Date: Sat Apr 12 10:45:11 2008
New Revision: 647477

URL: http://svn.apache.org/viewvc?rev=647477&view=rev
Log:
Mostly undo r641265:
We need the new Cluster interface methods
registerManager() and removeManager() but since our managers
never call them, keep logic inside the old methods.

Modified:

tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/tcp/SimpleTcpCluster.java

Modified: 
tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/tcp/SimpleTcpCluster.java
URL: 
http://svn.apache.org/viewvc/tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/tcp/SimpleTcpCluster.java?rev=647477&r1=647476&r2=647477&view=diff
==
--- 
tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/tcp/SimpleTcpCluster.java
 (original)
+++ 
tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/tcp/SimpleTcpCluster.java
 Sat Apr 12 10:45:11 2008
@@ -553,31 +553,28 @@
 } catch (Exception x) {
 log.error("Unable to load class for replication manager", x);
 manager = new 
org.apache.catalina.cluster.session.DeltaManager();
-}
-}finally {
+} finally {
+if (manager != null) {
+manager.setDistributable(true);
+if (manager instanceof ClusterManager) {
+ClusterManager cmanager = (ClusterManager) manager;
+cmanager.setDefaultMode(true);
+cmanager.setName(getManagerName(name, manager));
+cmanager.setCluster(this);
+}
+}
+}}finally {
 Thread.currentThread().setContextClassLoader(oldCtxLoader);
 }
 return manager;
 }
 
+/** This method is actually never called.
+ * The TC 6 cluster interface forces it to exist,
+ * but the ported cluster managers from TC 5.5
+ * use addManager(String, Manager) instead.
+ */
 public void registerManager(Manager manager) {
-
-if (! (manager instanceof ClusterManager)) {
-log.warn("Manager [ " + manager + "] does not implement 
ClusterManager, addition to cluster has been aborted.");
-return;
-}
-ClusterManager cmanager = (ClusterManager) manager ;
-cmanager.setDistributable(true);
-// Notify our interested LifecycleListeners
-lifecycle.fireLifecycleEvent(BEFORE_MANAGERREGISTER_EVENT, manager);
-String clusterName = getManagerName(cmanager.getName(), manager);
-cmanager.setName(clusterName);
-cmanager.setCluster(this);
-cmanager.setDefaultMode(true);
-
-managers.put(clusterName, manager);
-// Notify our interested LifecycleListeners
-lifecycle.fireLifecycleEvent(AFTER_MANAGERREGISTER_EVENT, manager);
 }
 
 /**
@@ -599,17 +596,12 @@
 }
 }
 
-/**
- * remove an application form cluster replication bus
- *
- * @see 
org.apache.catalina.ha.CatalinaCluster#removeManager(java.lang.String,Manager)
+/** This method is actually never called.
+ * The TC 6 cluster interface forces it to exist,
+ * but the ported cluster managers from TC 5.5
+ * use RemoveManager(String, Manager) instead.
  */
 public void removeManager(Manager manager) {
-if (manager != null && manager instanceof ClusterManager ) {
-ClusterManager cmgr = (ClusterManager) manager;
-String name = cmgr.getName();
-removeManager(name, manager);
-}
 }
 
 /**



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r647479 - /tomcat/sandbox/tomcat-oacc/trunk/docs/build.xml

2008-04-12 Thread rjung
Author: rjung
Date: Sat Apr 12 10:46:04 2008
New Revision: 647479

URL: http://svn.apache.org/viewvc?rev=647479&view=rev
Log:
Use ant task xslt instead of style for docs.
Get rid of ant warnings.

Modified:
tomcat/sandbox/tomcat-oacc/trunk/docs/build.xml

Modified: tomcat/sandbox/tomcat-oacc/trunk/docs/build.xml
URL: 
http://svn.apache.org/viewvc/tomcat/sandbox/tomcat-oacc/trunk/docs/build.xml?rev=647479&r1=647478&r2=647479&view=diff
==
--- tomcat/sandbox/tomcat-oacc/trunk/docs/build.xml (original)
+++ tomcat/sandbox/tomcat-oacc/trunk/docs/build.xml Sat Apr 12 10:46:04 2008
@@ -69,7 +69,7 @@
 
   
 
-
   
   
-
+
 
   
 
@@ -86,14 +86,14 @@
   
 
 
-
   
-
+
 
   
 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r647480 - /tomcat/sandbox/tomcat-oacc/trunk/build.xml

2008-04-12 Thread rjung
Author: rjung
Date: Sat Apr 12 10:46:44 2008
New Revision: 647480

URL: http://svn.apache.org/viewvc?rev=647480&view=rev
Log:
We don't pretend to be "the" cluster.

Modified:
tomcat/sandbox/tomcat-oacc/trunk/build.xml

Modified: tomcat/sandbox/tomcat-oacc/trunk/build.xml
URL: 
http://svn.apache.org/viewvc/tomcat/sandbox/tomcat-oacc/trunk/build.xml?rev=647480&r1=647479&r2=647480&view=diff
==
--- tomcat/sandbox/tomcat-oacc/trunk/build.xml (original)
+++ tomcat/sandbox/tomcat-oacc/trunk/build.xml Sat Apr 12 10:46:44 2008
@@ -15,7 +15,7 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 -->
-
+
 
 
   



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]