Reg: EXCEPTION_ACCESS_VIOLATION on JDBC in Java!!!!

2001-10-08 Thread JAVA TEAM
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 

Reg: EXCEPTION_ACCESS_VIOLATION on JDBC in Java!!!!

2001-10-07 Thread JAVA TEAM

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 repor