Hello again.

Just letting you know, it seems we managed to solve the memory leak.
Basically, some sessions were not being closed properly. I mean, I did close
them with the close() method, but they were kept in a kind of stale state.
Initially, we had a ConcurrentHashMap containing all sessions opened in our
application. There was a sweeping thread cleaning this map and closing those
sessions after a configured timeout.

It didn't solve our problem, so now I use the managedSessions collection
from both the Acceptor and Connector to close and remove idle sessions.
After 4 days of heavy load, the memory usage is normal and we haven't had
any OOM's so far.

Thank you so much for your support. I'd be more than glad to help someone
with a similar problem.

Regards.

2010/3/16 Cleber Cassol <ccas...@gmail.com>

> Thanks again, Emmanuel.
>
> I'll try using VisualVM to generate a memory dump. I think we close the
> sessions correctly, but, when profiling with JProfiler, I always get a lot
> of SocketIoSession objects on the heap. Do you think the number of IoThreads
> used by the Acceptors and Connectors could influence the memory consumption?
> We are using 5 IoThreads for the acceptor and 5 for the connector. We have
> about 4 million email accounts, but about 5% of it read messages through
> IMAP protocol.
>
> I'll see if I can prepare some user code and the memory dump to help you.
>
> Thanks.
>
> 2010/3/16 Emmanuel Lecharny <elecha...@gmail.com>
>
> On 3/16/10 6:34 PM, Cleber Cassol wrote:
>>
>>> Hi there!
>>>
>>> Thanks for the response. Do you recommend Mina 2.X for production
>>> environments, even when it is listed as unstable? My application is
>>> running
>>> on production environment, so the need to address the memory leak as fast
>>> as
>>> possible. I'm trying to figure it out for more than a week now, that's
>>> the
>>> reason I asked you guys.
>>>
>>>
>> Well, you can still use 1.1.7.
>>
>> Regarding the OOM, have you generated some memory dump? Using a tool like
>> VisualVM could help figuring out where the memory leak is generated.
>>
>> I would say that you may forget to close a session at some point, but
>> without the user code, it's difficult to say.
>>
>> FYI, I have used MINA on load tests with something like 5000 mesg/s, for
>> hours.  AFAIR, I was using 1.1.7, and I run the test exchanging around 70
>>  messages (LDAP), with a client and 100 threads. No problem at all.--
>>
>> Regards,
>> Cordialement,
>> Emmanuel Lécharny
>> www.nextury.com
>>
>>
>>
>
>
> --
> Abraços!
>



-- 
Abraços!

Reply via email to