Increased memory usage

Hrm. I’‘m seeing an aweful lot of smatterings on the web about this being a known bug in java 6 and 1.5 and will be fixed in java 7. I see a lot of “are you going to backport it to 6 and 1.5 or not?” type things. It’‘s hard to tell whether it’‘s really a problem on that end or not. I did migrate a batch of new objects to use ConcurrentHashMap’‘s and such between 1.0.2 and 1.1.0. Could it be that that’'s biting me in the ass?

The only thing I really added in 1.1.0 beta that explicitly has to do with locks is in BaseTransport. I’'m wondering if my code there just sucks. I never really did “like it”. Felt kludgy.

If any of you are interested in looking at it and seeing if it looks dumb, it’'s around line 306 in BaseTransport.java. =)

Ok folk, little status update. Using some other tools and some test builds, we’‘ve determined that it’‘s not that locking mechanism that I set up that’‘s causing the problem. Unfortunately though, the only thing I can trace it to at all is openymsg. It’‘s hard to figure out where everything is being refererred from, but the only “not a part of java itself” piece that seems to be coming up is something within openymsg. I’‘m going to ask Guus to look at it a bit when he’'s got some time and we can coordinate, so stay tuned!

Daniel,

I’'m using the embedded database and memory utilisation on my server is odd;

Java is running in 1GB of memory. Normal memory utilisation is ‘‘a hundred and odd’’ MB. My server has been running for about 2 weeks since last update with about 200 concurrent users (40% of which use the gateways).

During that period memory utilisation started very low (<100 MB), then increased to about 240MB. However, periodically (every few days) it seems to dump a load of used memory and revert back to 100MB.

So, my server doesn’'t need rebooting using the latest version of the gateway with people using MSN, ICQ and GoogleTalk though I do seem to be seeing a memory leak which ‘‘fixes itself’’ over time.

D

Do you have Yahoo activated at all?

(anxiously awaiting details)

I’'ve got openfire running with mysql and Yahoo enabled. After 3 days my memory of about 250 mb is full and I have to restart the openfired.

Do any of you have enterprise?

No, I don’'t.

I’'m not using Enterprise either.

I havn’'t updated to JDK 1.6.0 yet but I did run the server on JRE 1.6.0 for a few days and the problem with memory not being free remains.

This morning, after about one day up, the server stuck at 250+mb overnight so I had to reboot it this morning.

Hopefully portage will include JDK 1.6.0 soon so at least I can provide the jmap dump everyone’'s talking about.

Any of you who are having this issue… if you can do it without irritating your users too much, would you mind trying to disable the Yahoo transport and … well it might be better to restart your server to get to a clean slate … and then see if the memory leak still occurs after you disable it?

I can do that, i’'ll disable it today and check the memory usage in the morning.

If the memory is still high in the AM I will restart the server while leaving yahoo disabled.

We’'ll see.

Thanks again,

Josh

No, I don’'t have yahoo enabled.

D

I can’'t disable Yahoo transport neither…

But looking at my server’‘s statistics I’‘ve noticed that it has a lot of established connections to other servers’’ port 5190 (AOL IM port), even when there is nobody logged into AOL transport.

Using JConsole I’'ve seen lots of threads named ‘‘LoginConnection to login.oscar.aol.com:5190’’, which I suppose are responsible of the TCP connections I see.

I wonder if this could be related to the memory leak we’'re trying to find. Maybe there are some data structures associated to these threads growing as time goes by… (just a theory). ?:expressionless:

Our server was well over 250+ MB this morning with Yahoo disabled. It seems to have no effect.

Is anyone who experiences this issue not running AIM on their gateway?

Oh, that’'s very curious. So maybe LoginConnection is sticking around?

Hrm. Maybe I should go ahead and go through with my plans to revamp the OSCAR support to use a higher level API instead of low level function calls and such. That would let joscar “do whatever it wants” so to speak which hopefully it cleans up after itself well. I think I might bite the bullet and do that over the course of the next couple days. I mean I’'m alrady having to delay the release, and if this might help then so be it.

I’‘ve got a good indication that the insane number of java.util.concurrent.locks.AbstractQueuedSynchronizer$Node that were reported are caused by OpenYMSG (the Yahoo library using in the gateway plugin). I’'ve described the issue in detail in YMSG-12

Folk, it’‘s been a little bit since 1.1.0 Beta 5 has been out and I have one report that the memory issues seem to be behaving themselves. Anyone else trying it? It seems like the reports about leaks ceased after I put that version out but I haven’‘t had much "look like it’'s fixed!" coming in. =)

I installed beta 5 a few (2?) days ago and memory utilisation is less that I would have expected (100MB rather than 250MB previously) with 200 concurrent sessions.

I’'ll let it run a week and report back (because by that point it would have inflated as far as it was going to in earlier versions and my gateway protocol set).

138-175MB utilisation now. So, it’'s either fixed or improved in this version over the previous one.