Anyone else notice excessive memory usage while debugging tomcat?

I have had my IntelliJ running for 2 days and it has been OK with memory
usage. Staying below 50 the whole time.

I start a debug session and within 2 hours, it's at 118M. I GC'd it
down to 50M. Why does it grab an extra 50M when there is memory that
can be GC'd.

What is the JVM doing?

12 comments
Comment actions Permalink

The question should be what is IDEA doing?

"Norris Shelton" <no_reply@spam.com> schrieb im Newsbeitrag
news:ce8f25$ujj$1@is.intellij.net...

I have had my IntelliJ running for 2 days and it has been OK with memory
usage. Staying below 50 the whole time.

>

I start a debug session and within 2 hours, it's at 118M. I GC'd it
down to 50M. Why does it grab an extra 50M when there is memory that
can be GC'd.

>

What is the JVM doing?



0
Comment actions Permalink

Hi,

Please, take memory snapshot with YourKit profiler in low memory
condition after pressing GC and make it available to us.

Norris Shelton wrote:

I have had my IntelliJ running for 2 days and it has been OK with memory
usage. Staying below 50 the whole time.

I start a debug session and within 2 hours, it's at 118M. I GC'd it
down to 50M. Why does it grab an extra 50M when there is memory that
can be GC'd.
What is the JVM doing?



--
Best regards,
Maxim Mossienko
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

0
Comment actions Permalink

You sure it's not something Tomcat is not going?

R


On 7/28/04 12:04 PM, in article ce8iq4$t2i$1@is.intellij.net, "Ercan Özkan"
<ercano@netropol.com> wrote:

The question should be what is IDEA doing?

"Norris Shelton" <no_reply@spam.com> schrieb im Newsbeitrag
news:ce8f25$ujj$1@is.intellij.net...

>> I have had my IntelliJ running for 2 days and it has been OK with memory
>> usage. Staying below 50 the whole time.
>>
>> I start a debug session and within 2 hours, it's at 118M. I GC'd it
>> down to 50M. Why does it grab an extra 50M when there is memory that
>> can be GC'd.
>>
>> What is the JVM doing?



0
Comment actions Permalink

I have been thinking about this and I think it is NOT an IntelliJ
problem. One of the big changes from TC4 to TC5 was more efficient
object usage. I'm thinking that TC4 is just using a bunch of objects
and this is making the memory pool grow. We should be able to start
using TC5 here in the next couple of months. If I notice the same
problem, I will take a snap shot.

Is anyone else using TC4 seeing this? What about TC5 users?

Maxim Mossienko wrote:

Hi,

>

Please, take memory snapshot with YourKit profiler in low memory
condition after pressing GC and make it available to us.

>

Norris Shelton wrote:

>
>> I have had my IntelliJ running for 2 days and it has been OK with
>> memory usage. Staying below 50 the whole time.
>>
>> I start a debug session and within 2 hours, it's at 118M. I GC'd it
>> down to 50M. Why does it grab an extra 50M when there is memory that
>> can be GC'd.
>> What is the JVM doing?
>
>
>

0
Comment actions Permalink

Hi,
Tomcat itself is working in separate process so its implementation
should not affect the IDEA memory usage in significant way.

Norris Shelton wrote:

I have been thinking about this and I think it is NOT an IntelliJ
problem. One of the big changes from TC4 to TC5 was more efficient
object usage. I'm thinking that TC4 is just using a bunch of objects
and this is making the memory pool grow. We should be able to start
using TC5 here in the next couple of months. If I notice the same
problem, I will take a snap shot.

Is anyone else using TC4 seeing this? What about TC5 users?

Maxim Mossienko wrote:

>> Hi,
>>
>> Please, take memory snapshot with YourKit profiler in low memory
>> condition after pressing GC and make it available to us.
>>
>> Norris Shelton wrote:
>>
>>> I have had my IntelliJ running for 2 days and it has been OK with
>>> memory usage. Staying below 50 the whole time.
>>>
>>> I start a debug session and within 2 hours, it's at 118M. I GC'd it
>>> down to 50M. Why does it grab an extra 50M when there is memory that
>>> can be GC'd.
>>> What is the JVM doing?
>>
>>
>>
>>


--
Best regards,
Maxim Mossienko
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

0
Comment actions Permalink

Hmmm. I'm hoping that I will have some free time later today and early
Monday morning. If so, I will download YourKit and run it for a few hours.

Maxim Mossienko wrote:

Hi,
Tomcat itself is working in separate process so its implementation
should not affect the IDEA memory usage in significant way.

>

Norris Shelton wrote:

>
>> I have been thinking about this and I think it is NOT an IntelliJ
>> problem. One of the big changes from TC4 to TC5 was more efficient
>> object usage. I'm thinking that TC4 is just using a bunch of objects
>> and this is making the memory pool grow. We should be able to start
>> using TC5 here in the next couple of months. If I notice the same
>> problem, I will take a snap shot.
>>
>> Is anyone else using TC4 seeing this? What about TC5 users?
>>
>> Maxim Mossienko wrote:
>>
>>> Hi,
>>>
>>> Please, take memory snapshot with YourKit profiler in low memory
>>> condition after pressing GC and make it available to us.
>>>
>>> Norris Shelton wrote:
>>>
>>>> I have had my IntelliJ running for 2 days and it has been OK with
>>>> memory usage. Staying below 50 the whole time.
>>>>
>>>> I start a debug session and within 2 hours, it's at 118M. I GC'd
>>>> it down to 50M. Why does it grab an extra 50M when there is memory
>>>> that can be GC'd.
>>>> What is the JVM doing?
>>>
>>>
>>>
>>>
>>>
>
>

0
Comment actions Permalink

I noticed all kinds of services that dont get released when I stop debugging (Tomcat 5). My system has 1GB Ram it it ran out of memory after a couple of hours.

Also starting a debug session takes several seconds longer than in IDEA 4.0.3.

0
Comment actions Permalink

Can you duplicate it? My development cycle has entered a different
phase and I will not be using Tomcat for a few weeks.

Can you download YourKit and get a dump when it has used a ton of
memory. Their EAP is free and it integrates very easily.

http://yourkit.com/eap/index.jsp

bobmanc wrote:

>I noticed all kinds of services that dont get released when I stop debugging (Tomcat 5). My system has 1GB Ram it it ran out of memory after a couple of hours.
>
>Also starting a debug session takes several seconds longer than in IDEA 4.0.3.

>

0
Comment actions Permalink

Its not an internal error. It runs a cmd.exe and a java.exe every time the debug start and it never stops them.
I don't seem to be getting the right config to debug with tomcat. 4.0.3 seemed pretty straightforward. 4.5 seems much more difficult.

0
Comment actions Permalink

OK, the documentation id ridiculously bad here. What the heck is an exploded directory and where I want it to explode? Why would I want to exclude from module content or synchronize exploded directory. What is the relative path in deployment directory?

Anyway, I just let IDEA 4.5 read a 4.0.3 project file and figure it out itself as i never could have. After tweaking the final files I got it to work again.

It appears every time I do a Run or Debug it creates one cmd.exe and one java.exe service. After I stop the Run or Debug the service keeps running. Eventually the system runs out of memory.

0
Comment actions Permalink



On 8/4/04 4:49 PM, in article
9346866.1091652577547.JavaMail.itn@is.intellij.net, "bobmanc"
<no_mail@jetbrains.com> wrote:

OK, the documentation id ridiculously bad here. What the heck is an exploded
directory and where I want it to explode? Why would I want to exclude from
module content or synchronize exploded directory. What is the relative path in
deployment directory?


These are all standard J2EE terms...

Exploded directory, is the directory in which your war files are typically
extracted. In this case it is the directory which simulates an extracted
war file from IDEA. A directory that contains your application as it would
exist on a real site.

You can choose an exploded dir of your choice, there is no restriction.

You exclude content because there might be files you don't want to compile
or deploy to the exploded directory.

You want to synch your exploded directory because when you make a change to
a jsp page it needs to be copied (deployed) to the exploded directory.

The relative path is the path of a file based on the root of the exploded
directory:
If exploded dir is: C:\myapp
And you have a file in C:\myapp called foo.jsp then the relative path of
foo.jsp is / (the root) if it was at C:\myapp\jsp\foo.jsp then the relative
path is /jsp. The relative path is there so you can choose where you want
your files deployed. So you can choose, without changing the files in your
repository, where you want your jsp pages to be deployed for example.


Anyway, I just let IDEA 4.5 read a 4.0.3 project file and figure it out itself
as i never could have. After tweaking the final files I got it to work again.

It appears every time I do a Run or Debug it creates one cmd.exe and one
java.exe service. After I stop the Run or Debug the service keeps running.
Eventually the system runs out of memory.


Which version of Tomcat are you using???

R

0
Comment actions Permalink

Thanks for the info.
I am using Tomcat 5.0.25

0

Please sign in to leave a comment.