The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
October 2001

Advertisement

Advertisement

This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

correspondence

Posted by Chin Loong on October 28, 2001 at 10:13 PM

well, this is my correspondence with him/them.. recently i sent an email to ask for the progress but he/they hasn't replied.


From :
JAVA TEAM

To :
'Desmond Lee' <*snip*>

Subject :
RE: Reg: EXCEPTION_ACCESS_VIOLATION on JDBC in Java!!!!

Date :
Tue, 9 Oct 2001 12:53:13 -0000

Hi

I believe our poolman working fine, because it manage the connections properly
after the request has been processed. I wrote a simple code for shows the status
like "total connection", "available connections", "unavailable connections". It
gave proper status. Even if the connection has not been served some minute which
was set in the property file.

I am not able to read poolman bean was sent by you.

Please send it as text file.

With love
Velmurugan P
SSPL


-----Original Message-----
From: Desmond Lee [SMTP:*snip*]
Sent: Monday, October 08, 2001 6:55 PM
To: webteam@sslindia.com
Subject: Re: Reg: EXCEPTION_ACCESS_VIOLATION on JDBC in Java!!!!


Hi Mr. Velmurugan,

>From what I can see, all 3 crashes has something to do with the database. I
suggest that u look through

i) whether the SQL commands sent to the database is compatible with MS SQL
7.0 that you are using. perhaps some of the codes are suitable for Oracle
database, or perhaps some of the SQL commands are not properly implemented
by MS SQL 7.0. maybe u could look at the documentation of MS SQL 7.0 to look
through the bugs and reported errors (including un-fixed bugs).

ii) i personally hasn't used PoolMan before, so i don't really know whether
it's the reason of the crashes. PoolMan is the intermediary between the
database and the application, perhaps somehow it has something to do with
it. i suggest u take several days off to use another connection pool, to
determine whether PoolMan is the cause. I have a ConnectionPool class ready
for u, which will be attached together with this email.

iii) for your speed problem, the amount of memory and the situation of MS
SQL "sucking" up more memory as the time goes is worrying. really worrying.
can u check the database whether the connection is released after it is
used? i had a problem of database "sucking" up memory in the past.. and when
i checked my database (i used mySQL), it seems that for every log-in, 3
connections were used up and it were not freed. perhaps PoolMan might play a
role in this?

iv) about java taking up more memory.. maybe garbage collector isn't doing
its job properly. how about writing a invokeLater(runnable) to run a thread
that calls System.gc() every 1 hour or so?

[snip - ConnectionPool]
import java.io.*;
import java.sql.*;
import java.text.*;
import java.util.Date;


public class ConnectionPool implements Runnable {
private Thread runner;

private Connection[] connPool;
private int[] connStatus;

private long[] connLockTime, connCreateDate;
private String[] connID;
private String dbDriver, dbServer, dbLogin, dbPassword, logFileString;
private int currConnections, connLast, minConns, maxConns, maxConnMSec;

//available: set to false on destroy, checked by getConnection()
private boolean available=true;

private PrintWriter log;
private SQLWarning currSQLWarning;
private String pid;

/**
* Creates a new Connection Broker

* dbDriver: JDBC driver. e.g.
'oracle.jdbc.driver.OracleDriver'

* dbServer: JDBC connect string. e.g.
'jdbc:oracle:thin:@203.92.21.109:1526:orcl'

* dbLogin: Database login name. e.g. 'Scott'

* dbPassword: Database password. e.g. 'Tiger'

* minConns: Minimum number of connections to start with.

* maxConns: Maximum number of connections in dynamic pool.

* logFileString: Absolute path name for log file. e.g.
'c:/temp/mylog.log'

* maxConnTime: Time in days between connection resets. (Reset does
a basic cleanup)

*/
public ConnectionPool(String dbDriver, String dbServer, String dbLogin,
String dbPassword, int minConns, int maxConns,
String logFileString, double maxConnTime) throws IOException
{

connPool = new Connection[maxConns];
connStatus = new int[maxConns];
connLockTime = new long[maxConns];
connCreateDate = new long[maxConns];
connID = new String[maxConns];
currConnections = minConns;
this.maxConns = maxConns;
this.dbDriver = dbDriver;
this.dbServer = dbServer;
this.dbLogin = dbLogin;
this.dbPassword = dbPassword;
this.logFileString = logFileString;
maxConnMSec = (int)(maxConnTime * 86400000.0); //86400 sec/day
if(maxConnMSec < 30000) { // Recycle no less than 30 seconds.
maxConnMSec = 30000;
}

try {
log = new PrintWriter(new FileOutputStream(logFileString),true);

// Can't open the requested file. Open the default file.
} catch (IOException e1) {
try {
log = new PrintWriter(new FileOutputStream("DCB_" +
System.currentTimeMillis() + ".log"),
true);

} catch (IOException e2) {
throw new IOException("Can't open any log file");
}

}

// Write the pid file (used to clean up dead/broken connection)
SimpleDateFormat formatter
= new SimpleDateFormat ("yyyy.MM.dd G 'at' hh:mm:ss a zzz");
Date nowc = new Date();
pid = formatter.format(nowc);

BufferedWriter pidout = new BufferedWriter(new
FileWriter(logFileString + "pid"));
pidout.write(pid);
pidout.close();

log.println("Starting DbConnectionBroker Version 1.0.11:");
log.println("dbDriver = " + dbDriver);
log.println("dbServer = " + dbServer);
log.println("dbLogin = " + dbLogin);
log.println("log file = " + logFileString);
log.println("minconnections = " + minConns);
log.println("maxconnections = " + maxConns);
log.println("Total refresh interval = " + maxConnTime + " days");
log.println("-----------------------------------------");


// Initialize the pool of connections with the mininum connections:
// Problems creating connections may be caused during reboot when
the
// servlet is started before the database is ready. Handle this
// by waiting and trying again. The loop allows 5 minutes for
// db reboot.
boolean connectionsSucceeded=false;
int dbLoop=20;

try {
for(int i=1; i < dbLoop; i++) {
try {
for(int j=0; j < currConnections; j++) {
createConn(j);
}
connectionsSucceeded=true;
break;
} catch (SQLException e){
log.println("--->Attempt (" + String.valueOf(i) +
" of " + String.valueOf(dbLoop) +
") failed to create new connections set at
startup: ");
log.println(" " + e);
log.println(" Will try again in 15 seconds...");
try { Thread.sleep(15000); }
catch(InterruptedException e1) {}
}
}
if(!connectionsSucceeded) { // All attempts at connecting to db
exhausted
log.println("\r\nAll attempts at connecting to Database
exhausted");
throw new IOException();
}
} catch (Exception e) {
throw new IOException();
}

// Fire up the background housekeeping thread

runner = new Thread(this);
runner.start();

}//End DbConnectionBroker()


/**
* Housekeeping thread. Runs in the background with low CPU overhead.
* Connections are checked for warnings and closure and are periodically
* restarted.
* This thread is a catchall for corrupted
* connections and prevents the buildup of open cursors. (Open cursors
* result when the application fails to close a Statement).
* This method acts as fault tolerance for bad connection/statement
programming.
*/
public void run()
{
boolean forever = true;
Statement stmt=null;
String currCatalog=null;

while(forever) {

// Make sure the log file is the one this instance opened
// If not, clean it up!
try {
BufferedReader in = new BufferedReader(new
FileReader(logFileString + "pid"));
String curr_pid = in.readLine();
if(curr_pid.equals(pid)) {
//log.println("They match = " + curr_pid);
} else {
//log.println("No match = " + curr_pid);
log.close();

// Close all connections silently - they are definitely dead.
for(int i=0; i < currConnections; i++) {
try
{
connPool[i].close();
}
catch (SQLException e1) {} // ignore
}
// Returning from the run() method kills the thread
return;
}

in.close();

} catch (IOException e1) {
log.println("Can't read the file for pid info: " +
logFileString + "pid");
}


// Get any Warnings on connections and print to event file
for(int i=0; i < currConnections; i++) {
try {
currSQLWarning = connPool[i].getWarnings();
if(currSQLWarning != null) {
log.println("Warnings on connection " +
String.valueOf(i) + " " + currSQLWarning);
connPool[i].clearWarnings();
}
} catch(SQLException e) {
log.println("Cannot access Warnings: " + e);
}

}

for(int i=0; i < currConnections; i++) { // Do for each connection
long age = System.currentTimeMillis() - connCreateDate[i];


synchronized(connStatus) {
if(connStatus[i] > 0) { // In use, catch it next time!
continue;
}
connStatus[i] = 2; // Take offline (2 indicates housekeeping lock)
}

try { // Test the connection with createStatement call
if(age > maxConnMSec) { // Force a reset at the max conn time
throw new SQLException();
}

stmt = connPool[i].createStatement();
connStatus[i] = 0; // Connection is O.K.
//log.println("Connection confirmed for conn = " +
// String.valueOf(i));

// Some DBs return an object even if DB is shut down
if(connPool[i].isClosed()) {
throw new SQLException();
}


// Connection has a problem, restart it
} catch(SQLException e) {
try {
log.println(new Date().toString() +
" ***** Recycling connection " +
String.valueOf(i) + ":");

connPool[i].close();
createConn(i);

} catch(SQLException e1) {
log.println("Failed: " + e1);
connStatus[i] = 0; // Can't open, try again next time
}
} finally {
try{if(stmt != null) {stmt.close();}} catch(SQLException e1){};
}

}

try { Thread.sleep(20000); } // Wait 20 seconds for next cycle

catch(InterruptedException e) {
// Returning from the run method sets the internal
// flag referenced by Thread.isAlive() to false.
// This is required because we don't use stop() to
// shutdown this thread.
return;
}

}

} // End run

/**
* This method hands out the connections in round-robin order.
* This prevents a faulty connection from locking
* up an application entirely. A browser 'refresh' will
* get the next connection while the faulty
* connection is cleaned up by the housekeeping thread.
*
* If the min number of threads are ever exhausted, new
* threads are added up the the max thread count.
* Finally, if all threads are in use, this method waits
* 2 seconds and tries again, up to ten times. ICSter that, it
* returns a null.
*/
public Connection getConnection() {

Connection conn=null;

if(available){
boolean gotOne = false;

for(int outerloop=1; outerloop<=10; outerloop++) {

try {
int loop=0;
int roundRobin = connLast + 1;
if(roundRobin >= currConnections) roundRobin=0;

do {
synchronized(connStatus) {
if((connStatus[roundRobin] < 1) &&
(! connPool[roundRobin].isClosed())) {
conn = connPool[roundRobin];
connStatus[roundRobin]=1;
connLockTime[roundRobin] =
System.currentTimeMillis();
connLast = roundRobin;
gotOne = true;
break;
} else {
loop++;
roundRobin++;
if(roundRobin >= currConnections)
roundRobin=0;
}
}
}
while((gotOne==false)&&(loop < currConnections));

}
catch (SQLException e1)
{}

if(gotOne) {
break;
} else {
synchronized(this) { // Add new connections to the pool
if(currConnections < maxConns) {

try
{
createConn(currConnections);
currConnections++;
}
catch(SQLException e)
{
log.println("Unable to create new
connection: " + e);
}

}
}

try { Thread.sleep(2000); }
catch(InterruptedException e) {}
log.println("-----> Connections Exhausted! Will wait
and try " +
"again in loop " +
String.valueOf(outerloop));
}

} // End of try 10 times loop

} else {
log.println("Unsuccessful getConnection() request during
destroy()");
} // End if(available)

return conn;

}

/**
* Returns the local JDBC ID for a connection.
*/
public int idOfConnection(Connection conn) {
int match;
String tag;

try {
tag = conn.toString();
}
catch (NullPointerException e1) {
tag = "none";
}

match=-1;

for(int i=0; i< currConnections; i++) {
if(connID[i].equals(tag)) {
match = i;
break;
}
}
return match;
}

/**
* Frees a connection. Replaces connection back into the main pool for
* reuse.
*/
public String freeConnection(Connection conn) {
String res="";

int thisconn = idOfConnection(conn);
if(thisconn >= 0) {
connStatus[thisconn]=0;
res = "freed " + conn.toString();
//log.println("Freed connection " + String.valueOf(thisconn) +
// " normal exit: ");
} else {
log.println("----> Could not free connection!!!");
}

return res;

}

/**
* Returns the age of a connection -- the time since it was handed out
to
* an application.
*/
public long getAge(Connection conn) { // Returns the age of the
connection in millisec.
int thisconn = idOfConnection(conn);
return System.currentTimeMillis() - connLockTime[thisconn];
}

private void createConn(int i)

throws SQLException {

Date now = new Date();

try {
Class.forName (dbDriver);

connPool[i] = DriverManager.getConnection
(dbServer,dbLogin,dbPassword);

connStatus[i]=0;
connID[i]=connPool[i].toString();
connLockTime[i]=0;
connCreateDate[i] = now.getTime();
}
catch (ClassNotFoundException e2)
{}

log.println(now.toString() + " Opening connection " +
String.valueOf(i) +
" " + connPool[i].toString() + ":");
}

/**
* Shuts down the housekeeping thread and closes all connections
* in the pool. Call this method from the destroy() method of the
servlet.
*/

/**
* Multi-phase shutdown. having following sequence:
*


    *
  1. getConnection() will refuse to return connections.
    *
  2. The housekeeping thread is shut down.

    * Up to the time of millis milliseconds ICSter shutdown
    of
    * the housekeeping thread, freeConnection() can still
    be
    * called to return used connections.
    *
  3. ICSter millis milliseconds ICSter the shutdown of
    the
    * housekeeping thread, all connections in the pool are closed.
    *
  4. If any connections were in use while being closed then a
    * SQLException is thrown.
    *
  5. The log is closed.
    *


* Call this method from a servlet destroy() method.
*
* @param millis the time to wait in milliseconds.
* @exception SQLException if connections were in use ICSter
* millis.
*/
public void destroy(int millis) throws SQLException {

// Checking for invalid negative arguments is not necessary,
// Thread.join() does this already in runner.join().

// Stop issuing connections
available=false;

// Shut down the background housekeeping thread
runner.interrupt();

// Wait until the housekeeping thread has died.
try { runner.join(millis); }
catch(InterruptedException e){} // ignore

// The housekeeping thread could still be running
// (e.g. if millis is too small). This case is ignored.
// At worst, this method will throw an exception with the
// clear indication that the timeout was too short.

long startTime=System.currentTimeMillis();

// Wait for freeConnection() to return any connections
// that are still used at this time.
int useCount;
while((useCount=getUseCount())>0 && System.currentTimeMillis() -
startTime <= millis) {
try { Thread.sleep(500); }
catch(InterruptedException e) {} // ignore
}

// Close all connections, whether sICSe or not
for(int i=0; i < currConnections; i++) {
try
{
connPool[i].close();
}
catch (SQLException e1)
{
log.println("Cannot close connections on Destroy");
}
}

if(useCount > 0) {
//bt-test successful
String msg="UnsICSe shutdown: Had to close "+useCount+
" active DB connections ICSter "+millis+"ms";
log.println(msg);
// Close all open files
log.close();
// Throwing following Exception is essential because servlet
authors
// are likely to have their own error logging requirements.
throw new SQLException(msg);
}

// Close all open files
log.close();

}//End destroy()


/**
* Less sICSe shutdown. Uses default timeout value.
* This method simply calls the destroy() method
* with a millis
* value of 10000 (10 seconds) and ignores SQLException
* thrown by that method.
* @see #destroy(int)
*/
public void destroy() {
try {
destroy(10000);
}
catch(SQLException e) {}
}

/**
* Returns the number of connections in use.
*/
// This method could be reduced to return a counter that is
// maintained by all methods that update connStatus.
// However, it is more efficient to do it this way because:
// Updating the counter would put an additional burden on the most
// frequently used methods; in comparison, this method is
// rarely used (although essential).
public int getUseCount() {
int useCount=0;
synchronized(connStatus) {
for(int i=0; i < currConnections; i++) {
if(connStatus[i] > 0) { // In use
useCount++;
}
}
}
return useCount;
}//End getUseCount()

/**
* Returns the number of connections in the dynamic pool.
*/
public int getSize() {
return currConnections;
}//End getSize()

}// End class
*******
[/snip]

all the best!
chin loong

p.s. if the code is jumbled up, u can email me again to ask for the text
file. i'll attach it in another file and send to u. do keep me posted about
your progress.

>From: JAVA TEAM
>To: 'Desmond Lee' <*snip*>
>Subject: Reg: EXCEPTION_ACCESS_VIOLATION on JDBC in Java!!!!
>Date: Mon, 8 Oct 2001 10:42:31 -0000
>
>
>
>HI,
>Software Environment
>
>An Intranet based application has been developed by our organization using
>JAVA, JSP and Java Script initially in JDK 1.2.2 and later upgraded to JDK
>1.3.1
>
>This application is being run on Windows NT 4.0 platform. The Web Server
>being used is Apache 1.3.20 for Windows NT. The servlet runner being used
>is Tomcat 3.2.2.
>
>The database being used is MS - SQL Server 7.0.
>
>The application is also using the PoolMan 1.4b5 a freeware for creating a
>connection pool using which connection to the database is managed.
>
>The application is using JDBC- ODBC Type 1 driver to connect to MS - SQL
>Server.
>
>Hardware Setup at the Clients place.
>
>At the user site were the application is currently running, the server
>configuration is as follows
>
>Pentium II Process (500 MHz, Single Process)
>393 MB RAM
>Hard Disk has been divided into three logical drives of C, E and F
>(Totaling to 10 GB).
>The application is stored in E drive and the Database in F drive.
>The virtual memory that has been defined is 395 MB
>
>Current size of the database at the user site is 27 MB.
>Number of concurrent users of the application is 30.
>
>IE 5.0 and I.E 5.5 is used to work with the application.
>
>The application has been running live for all 22 days and has been accessed
>round the clock on all 7 days.
>
>Problem being faced
>
>It has been found that at the time of starting the application, the
>performance of the application is very good. But as the application is
>continuously used, the performance is reducing considerably and at times
>Java crashes.
>
>It was noted by the client that MS- SQL Server was occupying memory at a
>fast phase and was reaching around 185 MB in few hours time. Not only that
>it was not releasing memory.
>
>At the same time Java itself was occupying memory ranging between 20 to 30
>MB. But Java was consuming more amount of CPU time. Above 95% for a long
>period of time continuously.
>
>Initially Java was also found to occupy an increasing amount of memory
>space, without any release as the application is continuously accessed.
>
>Not only that the user noticed that when the memory occupied by SQL Server
>reaches the range of around 180 MB and % of CPU time used by Java continues
>to be above 90% for a long time, the performance is very low. So they had
>to stop the tomcat and apache server and start them again.
>
>It was also found that Java was crashing frequently. Sometimes after a long
>time when the memory occupation of SQL Server had reached around 180 MB and
>sometimes even within few hours of re-starting Tomcat and Apache.
>
>
>
>Measures taken to rectify this problem
>
>Initially this application was developed in JDK 1.2.2.
>
>User reported crashing of Java on a frequent basis.
>
>We rectified this and the system was working fine.
>
>But soon the problem of Java occupying increasing amount of memory was
>first reported.
>
>After cross verifying our code to make sure there is no problem out there
>we posted questions in various forums in the net. Based on the replies we
>got, it was decided that we replace JDK 1.2.2 with JDK 1.3.1.
>
>So the application was upgraded to JDK 1.3.1. After having upgraded the
>system, every single option was thoroughly checked for compatibility. It
>was found to work fine.
>
>This stabilized the memory usage by Java.
>
>User then reported the increasing occupation of memory by SQL Server and
>the reduction of performance of the application as the time passes. The
>user also reported sporadic crash of Java.
>
>After going through the SQL Server Online help about SQL Server memory
>management, we recommended the following changes to the NT Setup.
>
>1. Give equal priority to both the background process as well as foreground
>process.
>2. Assign a virtual memory space equal to 1 - 2 times the available RAM
>size.
>
>The user has done these changes in their server.
>
>User continued to have low performance from the application and crash of
>Java.
>
>We did a code walkthrough and did fine tuning of the code in many of the
>options and the same was installed at the user site.
>
>Summary
>
>Despite all these changes user is finding that as the application is being
>accessed, the performance is reducing as the time passes. While there has
>been no report of crashing after the installation of tuned coding. But it
>has been only two days since the new changes have been effected.
>
>Java used to crash at least once a day. Sometimes after 3 hours of starting
>the application and some other time after nearly 15 hours of starting the
>application.
>
>It would be of immense help to us if after going through this document,
>anybody could suggest were the possible error could be and a solution to
>it.
>
>The hardware configuration of the server where the application is currently
>running has been given. Please tell us know whether there could be any
>problem in that aspect? What could be the right configuration for this
>application?
>
>Some of the sample of errors that was seen in the jvm.stdout file when the
>last three crashes were reported by the user.
>
>
>First Crash after the application was upgraded to Java 1.3.1
>
>An unexpected exception has been detected in native code outside the VM.
>Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0x1f701369
>Function name = SQLGetInfoW
>Library=C:\WINNT\System32\ODBC32.dll
>
>Current Java thread:
> at sun.jdbc.odbc.JdbcOdbc.disconnect(Native Method)
> at sun.jdbc.odbc.JdbcOdbc.SQLDisconnect(JdbcOdbc.java:2413)
> at sun.jdbc.odbc.JdbcOdbcDriver.disconnect(JdbcOdbcDriver.java:859)
> at sun.jdbc.odbc.JdbcOdbcConnection.close(JdbcOdbcConnection.java:735)
> at sun.jdbc.odbc.JdbcOdbcConnection.finalize(JdbcOdbcConnection.java:85)
> at java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method)
> at java.lang.ref.Finalizer.runFinalizer(Finalizer.java:86)
> at java.lang.ref.Finalizer.access$100(Finalizer.java:17)
> at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:163)
>
>Dynamic libraries:
>0x00400000 - 0x00405000 e:\jdk1.3.1\bin\java.exe
>0x77F60000 - 0x77FBE000 C:\WINNT\System32\ntdll.dll
>0x77DC0000 - 0x77DFF000 C:\WINNT\system32\ADVAPI32.dll
>0x77F00000 - 0x77F5E000 C:\WINNT\system32\KERNEL32.dll
>0x77E70000 - 0x77EC5000 C:\WINNT\system32\USER32.dll
>0x77ED0000 - 0x77EFC000 C:\WINNT\system32\GDI32.dll
>0x77E10000 - 0x77E67000 C:\WINNT\system32\RPCRT4.dll
>0x78000000 - 0x78044000 C:\WINNT\system32\MSVCRT.dll
>0x6D420000 - 0x6D4EE000 e:\jdk1.3.1\jre\bin\hotspot\jvm.dll
>0x77FD0000 - 0x77FFA000 C:\WINNT\System32\WINMM.dll
>0x6D220000 - 0x6D227000 e:\jdk1.3.1\jre\bin\hpi.dll
>0x6D3B0000 - 0x6D3BD000 e:\jdk1.3.1\jre\bin\verify.dll
>0x6D250000 - 0x6D266000 e:\jdk1.3.1\jre\bin\java.dll
>0x6D3C0000 - 0x6D3CD000 e:\jdk1.3.1\jre\bin\zip.dll
>0x77BF0000 - 0x77BF7000 C:\WINNT\System32\rpcltc1.dll
>0x6D340000 - 0x6D348000 E:\jdk1.3.1\jre\bin\net.dll
>0x776D0000 - 0x776D8000 C:\WINNT\system32\WSOCK32.dll
>0x776B0000 - 0x776C4000 C:\WINNT\system32\WS2_32.dll
>0x776A0000 - 0x776A7000 C:\WINNT\system32\WS2HELP.dll
>0x77660000 - 0x7766F000 C:\WINNT\system32\msafd.dll
>0x77690000 - 0x77699000 C:\WINNT\System32\wshtcpip.dll
>0x74FF0000 - 0x74FFE000 C:\WINNT\System32\rnr20.dll
>0x6D290000 - 0x6D29A000 E:\jdk1.3.1\jre\bin\JdbcOdbc.dll
>0x1F700000 - 0x1F735000 C:\WINNT\System32\ODBC32.dll
>0x71590000 - 0x71617000 C:\WINNT\system32\COMCTL32.dll
>0x77C40000 - 0x77D7C000 C:\WINNT\system32\SHELL32.dll
>0x77D80000 - 0x77DB2000 C:\WINNT\system32\comdlg32.dll
>0x77A90000 - 0x77A9B000 C:\WINNT\system32\VERSION.dll
>0x779C0000 - 0x779C8000 C:\WINNT\system32\LZ32.dll
>0x1F7F0000 - 0x1F804000 C:\WINNT\System32\odbcint.dll
>0x41230000 - 0x412AE000 C:\WINNT\System32\sqlsrv32.dll
>0x41100000 - 0x4110C000 C:\WINNT\System32\SQLWOA.dll
>0x77800000 - 0x7783A000 C:\WINNT\system32\NETAPI32.dll
>0x77840000 - 0x77849000 C:\WINNT\system32\NETRAP.dll
>0x777E0000 - 0x777ED000 C:\WINNT\system32\SAMLIB.dll
>0x65340000 - 0x653D2000 C:\WINNT\system32\OLEAUT32.dll
>0x77B20000 - 0x77BD7000 C:\WINNT\system32\ole32.dll
>0x75A80000 - 0x75A87000 C:\WINNT\System32\NDDEAPI.DLL
>0x77C00000 - 0x77C18000 C:\WINNT\System32\WINSPOOL.DRV
>0x1F750000 - 0x1F769000 C:\WINNT\System32\odbccp32.dll
>0x73310000 - 0x73318000 C:\WINNT\System32\DBNMPNTW.DLL
>0x76AC0000 - 0x76ADD000 C:\WINNT\System32\imagehlp.dll
>0x73A10000 - 0x73A22000 C:\WINNT\System32\PSAPI.DLL
>
>Local Time = Wed Sep 19 17:23:47 2001
>Elapsed Time = 8434
>#
># The exception above was detected in native code outside the VM
>#
># Java VM: Java HotSpot(TM) Client VM (1.3.1_01 mixed mode)
>#
># An error report file has been saved as hs_err_pid391.log.
># Please refer to the file for further information.
>#
>
>Second Crash after upgrading to Java 1.3.1
>
>An unexpected exception has been detected in native code outside the VM.
>Unexpected Signal : EXCEPTION_INVALID_HANDLE occurred at PC=0x77f89181
>Function name=RtlRaiseStatus
>Library=C:\WINNT\System32\ntdll.dll
>
>Current Java thread:
> at sun.jdbc.odbc.JdbcOdbc.disconnect(Native Method)
> at sun.jdbc.odbc.JdbcOdbc.SQLDisconnect(JdbcOdbc.java:2413)
> at sun.jdbc.odbc.JdbcOdbcDriver.disconnect(JdbcOdbcDriver.java:859)
> at sun.jdbc.odbc.JdbcOdbcConnection.close(JdbcOdbcConnection.java:735)
> at sun.jdbc.odbc.JdbcOdbcConnection.finalize(JdbcOdbcConnection.java:85)
> at java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method)
> at java.lang.ref.Finalizer.runFinalizer(Finalizer.java:86)
> at java.lang.ref.Finalizer.access$100(Finalizer.java:17)
> at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:163)
>
>Dynamic libraries:
>0x00400000 - 0x00405000 e:\jdk1.3.1\bin\java.exe
>0x77F60000 - 0x77FBE000 C:\WINNT\System32\ntdll.dll
>0x77DC0000 - 0x77DFF000 C:\WINNT\system32\ADVAPI32.dll
>0x77F00000 - 0x77F5E000 C:\WINNT\system32\KERNEL32.dll
>0x77E70000 - 0x77EC5000 C:\WINNT\system32\USER32.dll
>0x77ED0000 - 0x77EFC000 C:\WINNT\system32\GDI32.dll
>0x77E10000 - 0x77E67000 C:\WINNT\system32\RPCRT4.dll
>0x78000000 - 0x78044000 C:\WINNT\system32\MSVCRT.dll
>0x6D420000 - 0x6D4EE000 e:\jdk1.3.1\jre\bin\hotspot\jvm.dll
>0x77FD0000 - 0x77FFA000 C:\WINNT\System32\WINMM.dll
>0x6D220000 - 0x6D227000 e:\jdk1.3.1\jre\bin\hpi.dll
>0x6D3B0000 - 0x6D3BD000 e:\jdk1.3.1\jre\bin\verify.dll
>0x6D250000 - 0x6D266000 e:\jdk1.3.1\jre\bin\java.dll
>0x6D3C0000 - 0x6D3CD000 e:\jdk1.3.1\jre\bin\zip.dll
>0x77BF0000 - 0x77BF7000 C:\WINNT\System32\rpcltc1.dll
>0x6D340000 - 0x6D348000 E:\jdk1.3.1\jre\bin\net.dll
>0x776D0000 - 0x776D8000 C:\WINNT\system32\WSOCK32.dll
>0x776B0000 - 0x776C4000 C:\WINNT\system32\WS2_32.dll
>0x776A0000 - 0x776A7000 C:\WINNT\system32\WS2HELP.dll
>0x77660000 - 0x7766F000 C:\WINNT\system32\msafd.dll
>0x77690000 - 0x77699000 C:\WINNT\System32\wshtcpip.dll
>0x74FF0000 - 0x74FFE000 C:\WINNT\System32\rnr20.dll
>0x6D290000 - 0x6D29A000 E:\jdk1.3.1\jre\bin\JdbcOdbc.dll
>0x1F700000 - 0x1F735000 C:\WINNT\System32\ODBC32.dll
>0x71590000 - 0x71617000 C:\WINNT\system32\COMCTL32.dll
>0x77C40000 - 0x77D7C000 C:\WINNT\system32\SHELL32.dll
>0x77D80000 - 0x77DB2000 C:\WINNT\system32\comdlg32.dll
>0x77A90000 - 0x77A9B000 C:\WINNT\system32\VERSION.dll
>0x779C0000 - 0x779C8000 C:\WINNT\system32\LZ32.dll
>0x1F7F0000 - 0x1F804000 C:\WINNT\System32\odbcint.dll
>0x77B20000 - 0x77BD7000 C:\WINNT\system32\ole32.dll
>0x1F750000 - 0x1F769000 C:\WINNT\System32\odbccp32.dll
>0x41230000 - 0x412AE000 C:\WINNT\System32\sqlsrv32.dll
>0x41100000 - 0x4110C000 C:\WINNT\System32\SQLWOA.dll
>0x77800000 - 0x7783A000 C:\WINNT\system32\NETAPI32.dll
>0x77840000 - 0x77849000 C:\WINNT\system32\NETRAP.dll
>0x777E0000 - 0x777ED000 C:\WINNT\system32\SAMLIB.dll
>0x65340000 - 0x653D2000 C:\WINNT\system32\OLEAUT32.dll
>0x75A80000 - 0x75A87000 C:\WINNT\System32\NDDEAPI.DLL
>0x77C00000 - 0x77C18000 C:\WINNT\System32\WINSPOOL.DRV
>0x73310000 - 0x73318000 C:\WINNT\System32\DBNMPNTW.DLL
>0x76AC0000 - 0x76ADD000 C:\WINNT\System32\imagehlp.dll
>0x73A10000 - 0x73A22000 C:\WINNT\System32\PSAPI.DLL
>
>Local Time = Sat Sep 22 00:16:17 2001
>Elapsed Time = 29006
>#
># The exception above was detected in native code outside the VM
>#
># Java VM: Java HotSpot(TM) Client VM (1.3.1_01 mixed mode)
>#
># An error report file has been saved as hs_err_pid214.log.
># Please refer to the file for further information.
>#
>
>
>Third Crash after upgrading to Java 1.3.1
>
>An unexpected exception has been detected in native code outside the VM.
>Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0x1f7028cd
>Function name=SQLMoreResults
>Library=C:\WINNT\System32\ODBC32.dll
>
>Current Java thread:
> at sun.jdbc.odbc.JdbcOdbc.disconnect(Native Method)
> at sun.jdbc.odbc.JdbcOdbc.SQLDisconnect(JdbcOdbc.java:2413)
> at sun.jdbc.odbc.JdbcOdbcDriver.disconnect(JdbcOdbcDriver.java:859)
> at sun.jdbc.odbc.JdbcOdbcConnection.close(JdbcOdbcConnection.java:735)
> at sun.jdbc.odbc.JdbcOdbcConnection.finalize(JdbcOdbcConnection.java:85)
> at java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method)
> at java.lang.ref.Finalizer.runFinalizer(Finalizer.java:86)
> at java.lang.ref.Finalizer.access$100(Finalizer.java:17)
> at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:163)
>
>Dynamic libraries:
>0x00400000 - 0x00405000 e:\jdk1.3.1\bin\java.exe
>0x77F60000 - 0x77FBE000 C:\WINNT\System32\ntdll.dll
>0x77DC0000 - 0x77DFF000 C:\WINNT\system32\ADVAPI32.dll
>0x77F00000 - 0x77F5E000 C:\WINNT\system32\KERNEL32.dll
>0x77E70000 - 0x77EC5000 C:\WINNT\system32\USER32.dll
>0x77ED0000 - 0x77EFC000 C:\WINNT\system32\GDI32.dll
>0x77E10000 - 0x77E67000 C:\WINNT\system32\RPCRT4.dll
>0x78000000 - 0x78044000 C:\WINNT\system32\MSVCRT.dll
>0x6D420000 - 0x6D4EE000 e:\jdk1.3.1\jre\bin\hotspot\jvm.dll
>0x77FD0000 - 0x77FFA000 C:\WINNT\System32\WINMM.dll
>0x6D220000 - 0x6D227000 e:\jdk1.3.1\jre\bin\hpi.dll
>0x6D3B0000 - 0x6D3BD000 e:\jdk1.3.1\jre\bin\verify.dll
>0x6D250000 - 0x6D266000 e:\jdk1.3.1\jre\bin\java.dll
>0x6D3C0000 - 0x6D3CD000 e:\jdk1.3.1\jre\bin\zip.dll
>0x77BF0000 - 0x77BF7000 C:\WINNT\System32\rpcltc1.dll
>0x6D340000 - 0x6D348000 E:\jdk1.3.1\jre\bin\net.dll
>0x776D0000 - 0x776D8000 C:\WINNT\system32\WSOCK32.dll
>0x776B0000 - 0x776C4000 C:\WINNT\system32\WS2_32.dll
>0x776A0000 - 0x776A7000 C:\WINNT\system32\WS2HELP.dll
>0x77660000 - 0x7766F000 C:\WINNT\system32\msafd.dll
>0x77690000 - 0x77699000 C:\WINNT\System32\wshtcpip.dll
>0x74FF0000 - 0x74FFE000 C:\WINNT\System32\rnr20.dll
>0x6D290000 - 0x6D29A000 E:\jdk1.3.1\jre\bin\JdbcOdbc.dll
>0x1F700000 - 0x1F735000 C:\WINNT\System32\ODBC32.dll
>0x71590000 - 0x71617000 C:\WINNT\system32\COMCTL32.dll
>0x77C40000 - 0x77D7C000 C:\WINNT\system32\SHELL32.dll
>0x77D80000 - 0x77DB2000 C:\WINNT\system32\comdlg32.dll
>0x77A90000 - 0x77A9B000 C:\WINNT\system32\VERSION.dll
>0x779C0000 - 0x779C8000 C:\WINNT\system32\LZ32.dll
>0x1F7F0000 - 0x1F804000 C:\WINNT\System32\odbcint.dll
>0x77B20000 - 0x77BD7000 C:\WINNT\system32\ole32.dll
>0x1F750000 - 0x1F769000 C:\WINNT\System32\odbccp32.dll
>0x41230000 - 0x412AE000 C:\WINNT\System32\sqlsrv32.dll
>0x41100000 - 0x4110C000 C:\WINNT\System32\SQLWOA.dll
>0x77800000 - 0x7783A000 C:\WINNT\system32\NETAPI32.dll
>0x77840000 - 0x77849000 C:\WINNT\system32\NETRAP.dll
>0x777E0000 - 0x777ED000 C:\WINNT\system32\SAMLIB.dll
>0x65340000 - 0x653D2000 C:\WINNT\system32\OLEAUT32.dll
>0x75A80000 - 0x75A87000 C:\WINNT\System32\NDDEAPI.DLL
>0x77C00000 - 0x77C18000 C:\WINNT\System32\WINSPOOL.DRV
>0x73310000 - 0x73318000 C:\WINNT\System32\DBNMPNTW.DLL
>0x76AC0000 - 0x76ADD000 C:\WINNT\System32\imagehlp.dll
>0x73A10000 - 0x73A22000 C:\WINNT\System32\PSAPI.DLL
>
>Local Time = Sun Sep 23 17:08:36 2001
>Elapsed Time = 108454
>#
># The exception above was detected in native code outside the VM
>#
># Java VM: Java HotSpot(TM) Client VM (1.3.1_01 mixed mode)
>#
># An error report file has been saved as hs_err_pid137.log.
># Please refer to the file for further information.
>#
>
>
>
>Subsequently also we have had crashes which were similar to the one's
>specified above.
>
>
>Thanks in advance,
>
>Velmurugan P
>SoftSolutions
>Chennai.
>
>
>
>
>
>
>
>
>
>
>
>-----Original Message-----
>From: Desmond Lee [SMTP:chinloong@hotmail.com]
>Sent: Sunday, October 07, 2001 9:25 AM
>To: webteam@sslindia.com
>Subject: Re: Java Memory Problem
>
>hi there,
>
>the thing is, first you would have to identify what causes tomcat to crash.
>and like u said, it might be because of memory problem/overloading. then we
>have to find out what causes that.. is it because of untracked object
>creation, or memory leak.. or anything like that..
>
>i don't know how to help because u didn't say what exactly the problem is..
>
>perhaps u could use Optimizeit at http://www.vmgear.com/index.html to help
>you trace the problem.
>
>best regards,
>Chin Loong
>
>p.s. do keep in touch..
>
> >From: JAVA TEAM
> >To: "'chinloong@hotmail.com'"
> >Subject: Java Memory Problem
> >Date: Sat, 6 Oct 2001 19:32:43 -0000
> >
> >Hi,
> >
> >We are developing a JSP Application with the following architecture.
> >1) OS - Windows NT 4.0
> >2) MS-SQL Server 7.0
> >3) JDK 1.3.1_01 (Standard Edition)
> >4) Apache Web Server 1.3.20
> >5) Tomcat 3.2.2
> >6) PoolMan 1.3.9
> >7) Sun's JDBC Driver
> >
> >Our application has around 1500 JSP pages and 500 Beans. The number of
> >users is around 250, concurrent hits to the server is around 50. The
> >Hardware architecture is Pentium II 500 MHz with 393 MB Ram and 10 GB
>Hard
> >disk.
> >
> >The application is having performance degradation on constant usage for
> >around 3-4 hours. The application is also having 'Java crash down' after
>a
> >usage of 8-9 hours. The tomcat engine is shut down automatically. Is
>their
> >any possible solution for performance improvement and avoiding Java crash
> >for this application?
> >
> >Thanks in advance.
> >
> >Regards,
> >
> >Rajesh
> >SSPL
> >





Replies:
  • One more question Jay October 30, 2001 at 7:31 PM (1)
    • : ( Chin Loong November 02, 2001 at 11:41 PM (0)

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us