Details

    • Type: Bug Bug
    • Status: In Progress
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: v3.0.1
    • Fix Version/s: None
    • Component/s: jdbc
    • Labels:
      None
    • Environment:

      CentOS 5.4 virtualised on VMWare.

      Description

      We're running an application on Glassfish 3.0.1 with a few issues. The glassfish server often loses its connection to the oracle database and connections are closed and 'lost', never to be usable again. Whether this is glassfish or the applications fault, that things aren't cleaned up and connections aren't freed I don't know and isn't really what I came here for but its a bit of background. The application uses a JDBC Connection Pool, the resource type is javax.sql.XADataSource

      The reason I came here is because my graphing of the number of free connections broke and it broke because I didn't anticipate this:

      server.resources.NameOfStoredProcPool.numconnfree-current = -19

      Why on earth is it reporting a negative number? This shouldn't be possible should it?

      Attached is the entire output of asadmin get --monitor server.resources.NameOfStoredProcPool.*

      1. asadmin-output.txt
        8 kB
        vai_jpc
      2. domain.xml
        18 kB
        vai_jpc

        Activity

        Hide
        Shalini added a comment -

        Could you please try the same with a latest promoted build of glassfish 3.1? There was an issue : http://java.net/jira/browse/GLASSFISH-9990 reported and was fixed in glassfish 3.1 b26.

        Show
        Shalini added a comment - Could you please try the same with a latest promoted build of glassfish 3.1? There was an issue : http://java.net/jira/browse/GLASSFISH-9990 reported and was fixed in glassfish 3.1 b26.
        Hide
        vai_jpc added a comment -

        Aha thanks I'll see what I can do about testing that. Apologies that I didn't find it in my original googling. (A bug tracker itself was hard to find and I definitely wouldn't have found it if I didn't know jira was the software used!)

        Show
        vai_jpc added a comment - Aha thanks I'll see what I can do about testing that. Apologies that I didn't find it in my original googling. (A bug tracker itself was hard to find and I definitely wouldn't have found it if I didn't know jira was the software used!)
        Hide
        Shalini added a comment -

        Sorry looks like the issue 9990 was fixed in 3.0. Could you please attach the domain.xml configuration for this pool? Please describe more about your test case. A sample application would be helpful to reproduce in my environment and fix this issue.

        Show
        Shalini added a comment - Sorry looks like the issue 9990 was fixed in 3.0. Could you please attach the domain.xml configuration for this pool? Please describe more about your test case. A sample application would be helpful to reproduce in my environment and fix this issue.
        Hide
        vai_jpc added a comment - - edited

        Have attached a sanitised domain.xml from the server exhibiting the issue.

        I'm afraid I don't believe it will be possible to provide the application in question. Whether something stripped down could also provided, I'm unsure but unhopeful.

        Show
        vai_jpc added a comment - - edited Have attached a sanitised domain.xml from the server exhibiting the issue. I'm afraid I don't believe it will be possible to provide the application in question. Whether something stripped down could also provided, I'm unsure but unhopeful.
        Hide
        Shalini added a comment -

        Do you see any connection validation exceptions in the server.log? Also, the leak tracing is not enabled. You could turn on leak tracing and observe if there are leaks from the server.log.
        I tried to create a jdbc connection pool with the config from your domain.xml. The application gets 40 connections (max pool size is 32) and the idle timeout i set is 30 seconds. The first 32 servlet instances will get connections right away and the remaining 8 wait for 60 seconds before getting a connection. After 60 seconds, the first 32 connections are closed by the app. Since the connections are leaked in the meantime, they are reclaimed (as per the config). When i observe the monitoring statistics for numconfree and numconnused, they are perfect. I used GlassFish 3.1.

        Show
        Shalini added a comment - Do you see any connection validation exceptions in the server.log? Also, the leak tracing is not enabled. You could turn on leak tracing and observe if there are leaks from the server.log. I tried to create a jdbc connection pool with the config from your domain.xml. The application gets 40 connections (max pool size is 32) and the idle timeout i set is 30 seconds. The first 32 servlet instances will get connections right away and the remaining 8 wait for 60 seconds before getting a connection. After 60 seconds, the first 32 connections are closed by the app. Since the connections are leaked in the meantime, they are reclaimed (as per the config). When i observe the monitoring statistics for numconfree and numconnused, they are perfect. I used GlassFish 3.1.
        Hide
        vai_jpc added a comment -

        Sometimes the connection fails to validate, sometimes we get 'connection closed' exceptions halfway through the job. Leak tracing isn't enabled no, but when it was enabled it didn't help reclaim connections. (Annoyingly, flush-connection-pool also fails to work.) I'm using 3.0.1.

        Show
        vai_jpc added a comment - Sometimes the connection fails to validate, sometimes we get 'connection closed' exceptions halfway through the job. Leak tracing isn't enabled no, but when it was enabled it didn't help reclaim connections. (Annoyingly, flush-connection-pool also fails to work.) I'm using 3.0.1.
        Hide
        Shalini added a comment -

        Please turn on the FINE logging for resource-adapter and post the full exception stack trace when you see the 'connection closed' exceptions. Do you see any connections being leaked (from server.log)?

        Show
        Shalini added a comment - Please turn on the FINE logging for resource-adapter and post the full exception stack trace when you see the 'connection closed' exceptions. Do you see any connections being leaked (from server.log)?
        Hide
        Shalini added a comment -

        Reducing the priority of this issue as it is not reproducible.

        Show
        Shalini added a comment - Reducing the priority of this issue as it is not reproducible.

          People

          • Assignee:
            sfelts
            Reporter:
            vai_jpc
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated: