>> Where does the image come from and how is it handled?  Sometimes image 
>> generation can be a problem.
The image is generated by software called ArcIMS.  ArcIMS uses a xml file 
called a map configuration file that has "pointers" to all of the GIS data 
layers and images.  The map configuration file is held in memory.  The ArcIMS 
API handles the image generation and provides the mechanism for connecting to 
the server, data layers, and making spatial queries against the geometry of the 
parcel the user enters.  Images are generated on the server and placed in an 
output directory accessible via a URL.  Essentially, the ArcIMS API has methods 
to get the geometry of the parcel the user enters, create a polygon, uses that 
polygon to compare whether any of the other 40+ layers possibly intersect the 
polygon, get each GIS layer recordset that intersects, and the map image 
associated with the map extent - which is a buffer of the geometry of the 
parcel by a distance of 500'.

Each of the 40+ layers have their own bean for place holders for the GIS layer 
recordsets and I use h:dataTable to iterate over those records.  Each bean is 
an array of arrays since it is possible that more than one attribute of a layer 
intersects the given parcel.  

>> Have you had to write any code to make the app work?
All of it.  It was just an idea I had to try to offer a non-map-interactive 
query tool for the user.  I didn't create the ArcIMS API, I'm just working with 
it.

I suspect that my problem is design and I'm sure it relates to having a 
session.  When is the right time to close a data connection during a session?   
 It seems like I need to have some code that determines the age of the session 
and then does some object cleanup?  The only reason I have a session at all is 
to make a round trip to the server to enable the search button and display a 
message when a parcel is not found.  What I thought was going to be an easy 
webapp has burgeoned into something much larger.

I'm sorry if I've turned this thread into a non-Tomcat issue.  But I really 
appreciate the feedback.

Leo

-----Original Message-----
From: Pid [mailto:p...@pidster.com] 
Sent: Thursday, January 14, 2010 10:49 AM
To: users@tomcat.apache.org
Subject: Re: Tomcat memory settings

On 14/01/2010 16:48, Leo Donahue - PLANDEVX wrote:
> Chris,
>
> Thank you for the feedback.  I followed Chuck's advice and set the initial 
> and maximum memory pool using the tomcat6w.exe  I have both values set to 
> 512MB.
>
> Windows Server 2003 Standard SP2 32-bit Tomcat 6.0.20 The Java Virtual 
> Machine:  C:\Program Files\Java\jdk1.6.0_14\jre\bin\server\jvm.dll
>
> Looking at the log files, the OOME appears in the logs after long periods of 
> time.  Yesterday the message did not appear in the logs until 1:50 AM.
>
> When Tomcat starts, it is consuming around 87MB of memory and by tomorrow it 
> will grow to around 118MB and somewhere in between there will be a OOME 
> message in the logs.  The webapp still works though.
>
> I hope I can answer the following but I'll admit to you now, I'm not 100% 
> sure I know what I'm doing.  Hopefully you will keep the laughter to a 
> minimum as a courtesy?
>
> I realize that my issue is now probably not related so much to Tomcat but 
> probably the design of the webapp.
>
>>> Do you keep a lot of information in users' sessions?
> I don't know, I'm only keeping one string value which is what the user enters 
> into the query text field.  The session timeout is set to 5 minutes.

If the string value is short, probably not then.

>>> How about in the application context?
> I'm not using any init params, if that is what you mean.

Sort of.

>>> Does your webapp cache a lot of information?
> I don't know.

OK.

>>> Do you use a database connection pool? If so, which one? What is the 
>>> configuration?
> No.  I am using a vendor API that makes a connection to their datasource.  
> The user enters a value in the JSF page, the action event is tied to a method 
> that looks up the value in the datasource, if the value was found then page 
> navigation ocurrs and displays results, if the value was not found a message 
> is displayed on the JSF page indicating the value was not found, using the 
> messages tag.

A resource leak is when, for example, a database connection is opened but not 
properly closed.  Each time it's opened it's using a bit of memory that isn't 
returned, because the connection is not closed.

It can be hard, but not impossible, to track down the source of this type of 
problem.

>>>   Does your webapp do anything that you expect to require very heavy memory 
>>> consumption (image manipulation, in-memory representations of large 
>>> datasets, etc.)?
>
> For each request, if the value is found in the datasource, up to 40 
> other beans are instantiated and compared to the result of the 
> request.  There is also one image that is returned in the process.  
> You can view it here: http://planning.maricopa.gov/plannetquickinfo
>
> You can use parcel: 211-52-011A as an example search.

Where does the image come from and how is it handled?  Sometimes image 
generation can be a problem.

Have you had to write any code to make the app work?


p


> -----Original Message-----
> From: Christopher Schultz [mailto:ch...@christopherschultz.net]
> Sent: Wednesday, January 13, 2010 2:03 PM
> To: Tomcat Users List
> Subject: Re: Tomcat memory settings
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Leo,
>
> On 1/11/2010 2:29 PM, Leo Donahue - PLANDEVX wrote:
>> org.apache.catalina.core.StandardWrapperValve invoke
>> SEVERE: Servlet.service() for servlet "servlet name" threw exception
>> java.lang.OutOfMemoryError: Java heap space
>
> To add to what others have said, getting an OOME can mean one of two things:
>
> 1. Your webapp simply needs more memory than you are allocating 2. You 
> have a resource leak
>
> Most often, #2 is the culprit.
>
> Under what conditions are you getting the OOME? Lots of users after a short 
> period of uptime, or all by yourself on your development environment after a 
> long period of time?
>
> Do you keep a lot of information in users' sessions? How about in the 
> application context? Does your webapp cache a lot of information? Do you use 
> a database connection pool? If so, which one? What is the configuration?
>
> Does your webapp do anything that you expect to require very heavy memory 
> consumption (image manipulation, in-memory representations of large datasets, 
> etc.)? If so, you may simply need more memory to properly run your webapp.
>
> Finally, with a 32-bit JVM (you didn't say which you were using), you'll 
> top-out around 2GiB for your heap no matter how much physical RAM you have. 
> If you need more than 2GiB of heap, you'll need to go with a 64-bit 
> environment.
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAktONOkACgkQ9CaO5/Lv0PAEMACfaS7G/FPgvCkEG1j4tS7mQkrC
> PkgAn3CYEh4D8eEa4FJdlLAIp7VmOIWZ
> =/cyT
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to