Announcement Announcement Module
Collapse
No announcement yet.
Memory Usage Management:( Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Memory Usage Management:(

    Unlike most of framework, the Spring generates the most of, if not all Java objects of an application during the startup. As a result, it consumes a lot of memory to bring up an application. I have been experiencing the OutofMemoryError on both production (Linux/TC5.5) and development(Window XP/TC5.5) installation while reloading the application.

    The following is one of such errors:

    org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'communityManager' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Can't resolve reference to bean 'adEntryDao' while setting property 'adEntryDao'; nested exception is org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'adEntryDao' defined in ServletContext resource [/WEB-INF/applicationContext-hibernate.xml]: Can't resolve reference to bean 'transactionManager' while setting property 'transactionManager'; nested exception is org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'transactionManager' defined in ServletContext resource [/WEB-INF/applicationContext-hibernate.xml]: Can't resolve reference to bean 'sessionFactory' while setting property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/applicationContext-hibernate.xml]: Initialization of bean failed; nested exception is java.lang.OutOfMemoryError: PermGen space

    While the size of the application is growing, this error occurs more frequently. I am getting sick to ask the hosting administrator to resolve this problem each time I reload the application. Is a way to handle the memory usage better with this framework?

    I don't know whether this is the right forum to post this question.

    Thanks in advance for any inputs.

    v.

  • #2
    You might sfind some answers here: http://opensource2.atlassian.com/con...on?pageId=2669

    Comment


    • #3
      Thanks very much for the memory leak link although I knew the TC has the problem. I will take a close look into the cause(s).

      On the other hand, reducing the number of beans might help to resolve this issue. The org.springframework.web.servlet.mvc.Parameterizabl eViewController has been used for those urls directed to the views. So, there are thirty Java beans for thirty views. All of those beans will be consolidated into one single bean if a multiaction controller is used.

      Comment


      • #4
        Currently we have almost 100 beans in our app. Things run fine. Although we aren't using Hibernate.

        Comment


        • #5
          Since using Tomcat 6.0 my PermGen space OutOfMemory exceptions are gone.

          Comment

          Working...
          X