1 Reply Latest reply on Jul 16, 2004 6:23 AM by oberkom

    simple EJB stress test

    oberkom Newbie

      Hi all,


      I am working with jboss3.0.6-Tomcat4.1.18, in a windows 2000 P4 2.4Ghz 1Gb Ram,
      I am doing some stress to a jsp that calls an EJB method, the jsp looks like:

      <%@ page import="es.myPackage.*"%>
      <%
      
      try {
      
       javax.naming.InitialContext ctx = new javax.naming.InitialContext();
       ConstantHome constantHome = (ConstantHome)ctx.lookup("es.myPackage.Constant");
       Constant constant = constantHome.create();
       java.util.Hashtable ht = (java.util.Hashtable)constant.findAll();
      
      } catch (Exception ignoreThis) {}
      
      %>



      The Constant EJB Class looks like:

      package es.myPackage;
      
      public class ConstantBean implements javax.ejb.SessionBean {
      
       private javax.ejb.SessionContext context;
       private java.sql.Connection con = null;
      
       public void setSessionContext(javax.ejb.SessionContext aContext) {
       this.context=aContext;
       }
      
       public void ejbActivate() { }
       public void ejbPassivate() { }
       public void ejbRemove() { }
       public void ejbCreate() { }
      
       public java.util.Hashtable findAll() throws java.sql.SQLException {
       java.util.Hashtable ht = new java.util.Hashtable();
       try {
      
       ht.put("lunes", "monday");
       ht.put("martes", "tuesday");
       ht.put("miercoles", "wednesday");
      
       } catch(Exception e){ System.out.print(e); }
      
       return ht;
       }
      
      }



      My tomcat41-service.xml config is:

      [...]
       <Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
       port="38080" minProcessors="5" maxProcessors="200"
       enableLookups="false" redirectPort="38443"
       acceptCount="150" debug="0" connectionTimeout="-1"
       useURIValidationHack="false" disableUploadTimeout="true" />
      [...]


      I execute jboss with the "-Xms50m -Xmx900m" memory options.


      I stress the server with a run test of 1 minute, from 1 to 120 users. The server pass the stress test, but when trying to compile other
      application Jsps, the server falls in a:


      10:51:49,385 ERROR [Engine] StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exception
      javax.servlet.ServletException
      at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:249)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:493)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
      at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:509)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:432)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:386)
      at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:534)
      at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:530)
      at java.lang.Thread.run(Thread.java:484)
      10:51:49,494 ERROR [Engine] ----- Root Cause -----
      java.lang.OutOfMemoryError
      <<no stack trace available>>
      10:52:01,057 ERROR [STDERR] java.lang.OutOfMemoryError
      10:52:01,057 ERROR [STDERR] <<no stack trace available>>


      The application at production must not fall with 120 users... And I dont believe jboss cannot resists this simple EJB test.

      Any ideas of whats wrong ?