List:MySQL and Java« Previous MessageNext Message »
From:Niklas Saers Date:July 10 2009 8:26am
Subject:Debugging my Connector/J based Tomcat Servlet
View as plain text  
Hi guys,
I'm having a problem with my servlet that runs on Tomcat and uses
Connector/J 5.1.7 to connect to MySQL. I'm quite certain that I don't keep
any database objects laying around in my servlet, yet the JVM fills up. I
used jmap to do a histogram of the running servlet, and it's filled with
database-related objects that I thought should have been garbage-collected
long ago:

| class                                                                |
bytes    | count  |
+----------------------------------------------------------------------+----------+--------+
| com.mysql.jdbc.Field                                                 |
55555488 | 385802 |
| com.mysql.jdbc.ByteArrayRow                                          |
10269536 | 641846 |
| com.mysql.jdbc.ResultSetImpl                                         |
5166128 |  29353 |
| com.mysql.jdbc.StatementImpl                                         |
3972528 |  27587 |
| com.mysql.jdbc.Field[]                                               |
1841728 |  18926 |
| com.mysql.jdbc.PreparedStatement                                     |
349856 |   1508 |
| com.mysql.jdbc.RowDataStatic                                         |
141600 |   5900 |
| com.mysql.jdbc.PreparedStatement$ParseInfo                           |
60320 |   1508 |
| com.mysql.jdbc.Buffer                                                |
40080 |   1670 |
| com.mysql.jdbc.DatabaseMetaData                                      |
36312 |   1513 |
| com.mysql.jdbc.ConnectionPropertiesImpl$BooleanConnectionProperty    |
34240 |    535 |
| com.mysql.jdbc.ConnectionPropertiesImpl$StringConnectionProperty     |
8960 |    140 |
| com.mysql.jdbc.ConnectionPropertiesImpl$IntegerConnectionProperty    |
8000 |    125 |
| com.mysql.jdbc.ConnectionImpl                                        |
5360 |      5 |
| com.mysql.jdbc.VersionedStringProperty                               |
2112 |     66 |
| com.mysql.jdbc.MysqlIO                                               |
1120 |      5 |
| com.mysql.jdbc.ConnectionPropertiesImpl$MemorySizeConnectionProperty |
1080 |     15 |
| com.mysql.jdbc.ConnectionPropertiesImpl$LongConnectionProperty
|      360 |      5 |
| com.mysql.jdbc.util.ReadAheadInputStream
|      160 |      5 |
| com.mysql.jdbc.StandardSocketFactory
|      120 |      5 |
| com.mysql.jdbc.log.StandardLogger
|       80 |      5 |
| com.mysql.jdbc.SingleByteCharsetConverter
|       48 |      3 |
| com.mysql.jdbc.Driver
|       16 |      2 |
| com.mysql.jdbc.log.NullLogger
|        8 |      1 |

I have no idea why 385802 fields should be laying around or 29353 resultsets
and 27587 statements. Do you have any suggestions as to what's going on, or
how I can debug this?

Cheers

    Nik

Thread
Debugging my Connector/J based Tomcat ServletNiklas Saers10 Jul
  • Re: Debugging my Connector/J based Tomcat ServletRonald Klop10 Jul
    • Re: Debugging my Connector/J based Tomcat ServletNiklas Saers10 Jul
      • Re: Debugging my Connector/J based Tomcat ServletRonald Klop10 Jul
        • Re: Debugging my Connector/J based Tomcat ServletNiklas Saers10 Jul
          • Re: Debugging my Connector/J based Tomcat ServletRonald Klop11 Jul
Re: Debugging my Connector/J based Tomcat ServletNiklas Saers10 Jul
  • Re: Debugging my Connector/J based Tomcat ServletRonald Klop11 Jul
    • Re: Debugging my Connector/J based Tomcat ServletNiklas Saers12 Jul
Re: Debugging my Connector/J based Tomcat ServletChristopher G. Stach II10 Jul
  • Re: Debugging my Connector/J based Tomcat ServletNiklas Saers12 Jul
    • Re: Debugging my Connector/J based Tomcat ServletChristopher G. Stach II12 Jul
    • Re: Debugging my Connector/J based Tomcat ServletRonald Klop12 Jul
      • Re: Debugging my Connector/J based Tomcat ServletNiklas Saers13 Jul
Re: Debugging my Connector/J based Tomcat ServletNiklas Saers12 Jul