3 Replies Latest reply on Jun 21, 2003 8:09 PM by clevanger

    Out of Memory serving JSP

    naarok

      I'm not sure if this is a JBoss issue, but I'm posting here anyway. Using JBoss 3.0.7 with bundled Jetty on Windows 2k, we are getting an out-of-memory error in JBoss when serving one of several pages for the nth time where n is between 4 and 8 depending on the page. The page is made up of struts and tiles tags and uses a Struts action. After serving one of these pages successfully a number of times, we will suddenly get an out-of-memory error, and watching Window's TaskManager, we see memory usage ramp to 100% very quickly. It looks like an infinite loop, but we can't find it anywhere in our code. If we put breakpoints in the jsp, the problem goes away.

      This problem appears both with normal jsp execution, and using pre-compiled jsps.

      Does anyone have any ideas?

        • 1. Re: Out of Memory serving JSP
          naarok

          I'm going to respond to myself. By adding -server to the java command launching JBoss, we seem to have overcome the problem.

          • 2. Re: Out of Memory serving JSP
            mafti

            I heard that the problem lies in the compiler itself.
            everytime you compile a jsp (thus with evry deployment) the compiler leaks a chunk of memory that doens't get GC'ed. hence the OutofMemory-error.

            • 3. Re: Out of Memory serving JSP
              clevanger

              looks like you have it under control, but just fyi, you really should get off of windows, change to jikes, and run at least 1.5gig memory if you plan to use this server in production.