tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shapira, Yoav" <Yoav.Shap...@mpi.com>
Subject RE: Tomcat Crash
Date Wed, 21 Aug 2002 13:15:25 GMT
Hi,
I suppose you can't post code for confidentiality reasons, so I won't
even ask for that.  But I have a couple of questions that may help us
understand the problem better.

If you're reading from a CSV file, why do you need a DB connection?
Couldn't you just open a FileReader, read a line at a time, use
StringTokenizer to get your tokens?  This approach will be very fast and
use very little memory, even for huge CSV files, because only one line
of the file has to be in memory at a time and the StringTokenizer for a
String is a small object.

In fact, you problem statement says "No database work is done at this
point..." so why all the discussion about Oracle connection pooling?

The next part would be the connection pooling implementation questions.


Did you try to get a new connection each time and not go through the
pool?  That would degrade performance significantly (although you could
just get one connection at the beginning and use it until you're done),
but maybe memory behavior will be better?

Did you try an alternative connection pooling implementation instead of
Oracle's?  One such as commons-dbcp or PoolMan?  If nothing else, it
would allow you to pinpoint the blame on the Oracle connection pooling
implementation.

And finally, are you trying to do any fancy cloning of data in the file
/ objects in the ImportManager?

This shouldn't be a tough problem ;)  I'm sure we can figure this out...

Yoav Shapira
Millennium ChemInformatics


>-----Original Message-----
>From: Durham David Cntr 805CSS/SCBE [mailto:David.Durham1@scott.af.mil]
>Sent: Tuesday, August 20, 2002 6:12 PM
>To: tomcat-user@jakarta.apache.org
>Subject: Tomcat Crash
>
>I'll try to make the circumstances of the crash as brief as possible.
>
>What I'm doing:  Importing data to my app from a comma delimited file.
>
>The data is parsed out of the file (one pass through the file only) put
>into objects and stored as static members of an ImportManager class.
The
>app then asks the user about the data, make some corrections, delete
>entries, etc.  No database work is done at this point, only
>manipulating/removing objects from a static Map in the ImportManager
class.
>
>The crash occurs on a doImport() method or shortly after.  This method
gets
>a connection from an Oracle connection pool (the pooling that comes
with
>their drivers).  The import will succeed if the data file size is
small,
>roughly 50 lines and then the system crawls for a bit before dieing.
Seems
>like a memory leak.  Does anyone know of any problems with the
connection
>pooling in the Oracle JDBC drivers?  I increased the maximum heap size
for
>tomcat service to 256MB, which should be more than enough for my
>development environment.
>
>
>Here's a sample of the logging that I set up to monitor the import:
>
>** Connection Retrieved, Free Memory: 1008416 Total Memory:4079616
>** Line: 47 PR completed: 1029879840
>** Line: 48 Squadron completed: 1029879840
>** Line: 48 Flight completed: 1029879840
>** Line: 48 Ratee completed: 1029879840
>** Line: 48 Rater completed: 1029879840
>** Connection Retrieved, Free Memory: 1276760 Total Memory:4079616
>** Connection Retrieved, Free Memory: 1137368 Total Memory:4079616
>** Connection Retrieved, Free Memory: 973464 Total Memory:4079616
>** Connection Retrieved, Free Memory: 809640 Total Memory:4079616
>** Connection Retrieved, Free Memory: 1185096 Total Memory:4079616
>** Connection Retrieved, Free Memory: 1007808 Total Memory:4079616
>** Line: 48 PR completed: 1029879840
>** Line: 49 Squadron completed: 1029879840
>** Line: 49 Flight completed: 1029879840
>** Line: 49 Ratee completed: 1029879840
>** Line: 49 Rater completed: 1029879840
>** Connection Retrieved, Free Memory: 1170000 Total Memory:4079616
>** Connection Retrieved, Free Memory: 1026288 Total Memory:4079616
>** Connection Retrieved, Free Memory: 853176 Total Memory:4079616
>** Connection Retrieved, Free Memory: 1203568 Total Memory:4079616
>** Connection Retrieved, Free Memory: 1064440 Total Memory:4079616
>** Connection Retrieved, Free Memory: 882136 Total Memory:4079616
>** Line: 49 PR completed: 1029879841
>** Connection Retrieved, Free Memory: 990840 Total Memory:4079616
>** Connection Retrieved, Free Memory: 876248 Total Memory:4079616
>
>
>Thanks for any help.
>
>-Dave
>
>
>
>--
>To unsubscribe, e-mail:   <mailto:tomcat-user-
>unsubscribe@jakarta.apache.org>
>For additional commands, e-mail: <mailto:tomcat-user-
>help@jakarta.apache.org>


Mime
View raw message