Thanks for the answer. I'm using Solaris 10 ( SPARC ) and java 1.6.0_14.
A bug on my applcation? My Server application is simply the "ElementalHttpServer.java" distribuited into the "HttpCore 4.0.1 (GA)" bin package, no more classes than the ones defined in it. I attached to my first mail the code I'm using. Also setting the -Xms and -Xmx range the memory allocated for the HttpServer grows without decreasing anymore. -----Original Message----- From: Stefan Parvu [mailto:[email protected]] Sent: lunedì 15 febbraio 2010 17.09 To: HttpClient User Discussion Subject: Re: HTTPCORE memory leak on simple server implementation > > When I start the server on Solaris platform and I start sending on it, > with a remote httpClient, the http requests, this is the output I can > see: > > >java -cp ./httpServerExample.jar:./httpcore-4.0.1.jar: > ElementalHttpServer > Listening on port 21000 > > Incoming connection from /10.10.10.176 New connection thread Incoming > entity content (bytes): 29155635 Client closed connection > > Looking at the memory with "prstat" I can observe that it increase > without release the resource allocated. It increase for each message > the http Server receive. > After the first http request it increase from 30M to 86M, after the > second from 86M to 142M, then raise up to 199M....until a java heap > exception is raised. > The incoming request throughput is quite low (1 message every 10 > seconds) > First of all make sure you define a -Xms and -Xmx range for your Java options and maybe a properl Young/Perm generation and ensure you have a proper heap geometry. Then try to use pmap and check the heap segment if you really suspect a memory leak. Example of pmap from a 32bit process: 0808A000 24K 4K rw--- [ heap ] 08090000 4K - rw--- [ heap ] 08091000 4K 4K rw--- [ heap ] what java are you using and what version ? What solaris ? > How can i avoid this memory behaviour? > Could it be a bug on your application ? Try to measure with pmap the anon segments, these will be your JVM consumed resources from Heap. stefan --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
