Announcement Announcement Module
No announcement yet.
Performance issue Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Performance issue


    I have developed an Spring application using spring Core, MVC, DAO, ORM, Context layers. Im using Tomcat 5.5 server.
    There are different listing and form pages. I have a performance issue while loading these page in some scenarios.

    Initially when i send request for product listing screen containing around 25 rows, the page is displayed in 1 to 2 seconds of time.

    Suppose i haven't accessed the application for Half-an-Hour, and when i request for the same product listing screen. The page is getting around 15 to 20 seconds of time to display.

    Is there any problem with Spring configuration or Tomcat server.

    Please give me solution for the problem.

  • #2
    It is difficult to tell you if there is something wrong with the spring configuration or the Tomcat config without seeing it.

    Initially, I would take a look at the database pooling - it can take several seconds for a connection to the database sometimes - 15 - 20 seconds seems excessive though.

    Steve O


    • #3
      If it may be with connection pooling, then we are using DB configuration as

      <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverM anagerDataSource" lazy-init="default" autowire="default" dependency-check="default">
      <property name="driverClassName" value="${init:jdbc.driver}" />
      <property name="url" value="${init:jdbc.url}" />
      <property name="username" value="${init:jdbc.user}" />
      <property name="password" value="${init:jdbc.password}" />

      Is there any better DB configuration?

      Second issue in the application is, we are getting java.Lang.OutOfMemory exception after approx 1:00 - 1:30 hrs of access.

      Third issue is, Initially when the application is accessed the memory used is around 700MB. On further screens access, the memory is not getting released and maintaining above 750MB.

      Suggest solution for all the 3 issues.



      • #4
        From the javadocs for DriverManagerDataSource:
        NOTE: This class is not an actual connection pool; it does not actually pool Connections. It just serves as simple replacement for a full-blown connection pool, implementing the same standard interface, but creating new Connections on every call.
        Check out or http:// for a real connection pool. I prefer DBCP, but I think more people here prefer C3PO.

        Good luck,

        Steve O


        • #5
          why not integrate these db pooling packages into spring framework?


          • #6
            Originally posted by thinke365 View Post
            why not integrate these db pooling packages into spring framework?
            Because it is not Spring responsibility to provide connection pooling. It is not more complicated to configure one of them (or some other connection pool, e.g. DB-vendor specific one) then say DriverManagerDataSource.