Trustin Lee wrote: > On 7/21/07, mat <[EMAIL PROTECTED]> wrote: >> Hi, Trustin >> >> I read this "The problem was the SocketChannel.write >> implementation. Indeed, even if you don't use DirectByteBuffer in >> your code, SocketChannel.writedoes it for you. This means that >> every time you call the write method, a new DirectByteBuffer is >> created. And since there is no real and effective GC on this type >> of objects, on heavy load, your application simply crash." > > Yes, it's true, but such a situation doesn't happen easily AFAIK. > >> However, my case seems not under heaving loading. I guess this >> problem should happen to most of peoples using Mina. No?? > > At least not for me. Other people could shed some light here.
I hesitate to post this because I don't have any factual data here. However, I have been having memory problems in my production application recently, and everything seems to have started right around the time the Mina code started to be used. Unfortunately, I have NOT been able to reproduce any memory leak whatsoever in a test environment, with or without MINA. The production problem only manifests over the course of about 5 days, and it seems to be associated with load. When the server is under load, memory is used up (and never collected), and when the server is not under load (even though transactions are still occurring) memory use stabilizes (with the normal gc peaks/valleys). My next step is to try and get a profiler on our running production app, but due to the performance overhead and the downtime while taking snapshots, this may very well be impossible. I know this may not even be MINA related but any suggestions are welcome :-) Cheers, Raman