Re: [MINA3] M1?
If you explain me how to do I can even take care ;) Bye, Norman Am 19.05.2013 um 18:20 schrieb Emmanuel Lécharny elecha...@gmail.com: Le 5/19/13 5:36 PM, Julien Vermillard a écrit : I just commited the NIO UDP client. I'll focus on UDP tests (both client and server). Would be nice if someone update the benchmarks for replacing the Netty client by the new one. You mean Netty 4 ? I con do that. And then I think we can fire a vote for a first milestone. DO we consider SSL handling ok ? Jeff ? I think I'll try to produce a old blocking IO based UDP server For see how it performs and if the inner code of MINA can easily accept blocking transports. We have to deliver a BioUdpServer and a BioTcpServer anyway. (and the client too). That would be a great addition to a first milestone, but if it's not ready, we can add it for M2. Thanks Julien ! -- Regards, Cordialement, Emmanuel Lécharny www.iktek.com
Re: [MINA3] M1?
Alright... Let me see if I find the time over the next days. Am 19.05.2013 um 18:48 schrieb Emmanuel Lécharny elecha...@gmail.com: Le 5/19/13 6:27 PM, Norman Maurer a écrit : If you explain me how to do I can even take care ;) This is pretty simple :) The code is in http://svn.apache.org/repos/asf/mina/mina/trunk/benchmarks/ we have benchmarks for Netty3 and MINA3, the idea is to add a combinaison for Netty4. The type of clients and servers are defined in the BenchmarkFactory class. You have to add a Netty4_udp and Netty4_tcp. Then the BenchmarkClientFactory and BenchmarkServerFactory class have to be augmented to handle the Netty4 clients and server for TCP and UDP. Those are pretty straghtforward modifications. Then you have to write the real flesh : in the nio/tcp and nio/udp packages, you have to add the classes to create the Netty4 client and server for UDP and TCP. This is where the initialization is done. Last, not least, the tests themselves are in some new classes names [Netty4|Netty3|Mina3]ClientVs[Netty4|Netty3|Mina3]Server[Tcp|Udp]BenchmarkBinaryTest. Those new classes just have to reference the correct type defined in the BenchmarkFactory. Thanks a lot of the help ! -- Regards, Cordialement, Emmanuel Lécharny www.iktek.com
Re: JAMES OOM, maybe the cause of MINA ?
We need to let Eric test it again. Currently he run the netty version of james to see if the cause is really MINA .. Thx, Norman 2010/4/13 Ashish paliwalash...@gmail.com: Is the OOM fixed after the change? thanks ashish On Mon, Apr 12, 2010 at 1:15 PM, Norman Maurer norman.mau...@googlemail.com wrote: Hi Ashish, I bet its the loop I mention before.. This would make sense when looking at the growing queued writes. I commited a change to trunk which close the session after write the data to the client. We will see if this helps.. Thx, Norman
Re: JAMES OOM, maybe the cause of MINA ?
Hi Ashish, I bet its the loop I mention before.. This would make sense when looking at the growing queued writes. I commited a change to trunk which close the session after write the data to the client. We will see if this helps.. Thx, Norman 2010/4/12 Ashish paliwalash...@gmail.com: On Sun, Apr 11, 2010 at 8:57 PM, Norman Maurer norman.mau...@googlemail.com wrote: Hi Ashish, after thinkin more about the whole stuff I wonder if the exception handling in SMTP could sometimes be an endless loop. In the handler we write a message back to the client on exception. But what happens if this throw a new exception ? Could it so loop forever ? I am not sure, but it could be possible. http://svn.apache.org/viewvc/james/server/trunk/smtpserver/src/main/java/org/apache/james/smtpserver/mina/SMTPIoHandler.java?revision=930014view=markup Maybe we should just close the connection.. hmm.. its brute force. I am not convinced that we should do this, but not sure as I don't have a complete picture as such. If the exception is coz of packet decoding, ignore the packet and move on.. Its also driven by the protocol as such. You may need to respond back to the client with some error code etc. Eric: Please mark a copy to mina dev ML as well, else I don't get your mails :) The analysis is a session is in hanging state, whose queue is building up. Heap dump are not going to help any more. Can you trace down what the hack is going on with that session. I can't get much out of heap dump and unfortunately not able to run it on laptop. jconsole simply refuse to detect the James process :( So the key lies in analyzing 1. Why is this session hanging, its simply not writing the data back to the client. There is a while before the session is closed and session.isConnected() returns false. Eric: can you upload the logs as well, if possible :) Anyone else has some idea's here? thanks ashish Bye Norman 2010/4/9 Eric Charles eric.char...@u-mangate.com: Hi Ashish, I am the user who has many OOM with the trunk and feed Norman with my issues :) 1. Indeed, you have the dump with CircularQueue from mina 2.0.0-RC1. This is the release we normally use in james and give the issue after a certain period of time. I mean, the server can stay working correctly 2 days or crash after 2 hours (see http://apache.u-mangate.com/james/oom/oom.png) due to a peak in memory usage. T To further investigate, we tried with mina trunk 2.0.0-RC2-SNAPSHOT : There, we see a direct crash. I've uploaded such a dump on http://apache.u-mangate.com/james/oom/index.html (click on shift-f5 to force refresh, I setup the web server in a hurry). You will see there recursive ConcurrentLinkedQueue. 2. As shown on http://apache.u-mangate.com/james/oom/oom.png, the system works while the line is flat (mail are received, spooled, delivered,...). On a few seconds, it peaks and of course, nothing works anymore. So, the messages don't remain in the spool. I made tests with quite huge messages, and they are delivered very fast as soon as they arrive in James. Don't hesitate to ask more questions or propose additional tests. Many tks in advance, Eric On 04/09/2010 12:40 PM, Ashish wrote: Norman, Couple of more queries 1. The heap dump uses circularqueue class, so seem to be taken for an earlier trunk snapshot. Is my take correct? 2. What's the state of the System? are the clients receiving the messages. The queue seems to be holding a very large number of objects. Essentially what I want to know is, if the clients are receiving the messages or the Server is holding them up. Will spend more time with the issue and see what I can figure out. thanks ashish On Thu, Apr 8, 2010 at 2:03 PM, Norman Maurer norman.mau...@googlemail.com wrote: Maybe Eric can do, cause he is the one who see it very freqently.. So Eric...;) ? Thx, Norman 2010/4/8 Ashishpaliwalash...@gmail.com: Can you provide the heapdump for this OOM? thanks ashish On Thu, Apr 8, 2010 at 1:40 PM, Ashishpaliwalash...@gmail.com wrote: On Thu, Apr 8, 2010 at 1:28 PM, Norman Maurer norman.mau...@googlemail.com wrote: Hi Ashish, I think we tracked down the source of the problem a bit more.. The OOM seems to be related to IMAP. Our IMAP server component is using the StreamIoHandler (its the only one of our components who use this handler). So I suspect there is the problem. So there are two possible problems: 1) Bug in StreamIoHandler 2) Wrong usage of StreamIoHandler. Our implementations is here: http://svn.apache.org/viewvc/james/server/trunk/imapserver/src/main/java/org/apache/james/imapserver/mina/ImapIoHandler.java?view=markup Thx, Norman Sorry, haven't been able to look at this so far :( earliest I can give it a shot will be on Sunday. thanks ashish - To unsubscribe, e-mail: server-dev-unsubscr
[jira] Created: (DIRMINA-780) Writing null objects to the Session should raise an Exception
Writing null objects to the Session should raise an Exception - Key: DIRMINA-780 URL: https://issues.apache.org/jira/browse/DIRMINA-780 Project: MINA Issue Type: Improvement Components: Core Reporter: Norman Maurer When using MINA in JAMES we saw malformated packets when processing POP3. This was a cause of a bug in our code which wrote a null object to the session. Unfortunally MINA don't throw an exception in this case and just write garbage to the session. We only found the bug because we have a netty implementation too which throws a NullPointerException in this case. I think MINA should do something similar.. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
Re: JAMES OOM, maybe the cause of MINA ?
Hi Asish, yeah in our case this is fine. But I think even if this fix the problem MINA should at least try to break such loops. Bye, Norman 2010/4/12 Ashish paliwalash...@gmail.com: On Mon, Apr 12, 2010 at 1:15 PM, Norman Maurer norman.mau...@googlemail.com wrote: Hi Ashish, I bet its the loop I mention before.. This would make sense when looking at the growing queued writes. I commited a change to trunk which close the session after write the data to the client. We will see if this helps.. I hope it solves the problem :) Closing the session means disconnecting the client. If the situation wants this its fine, else need to dig a bit more for solution :) If the problem is solved, I consider its a good start for the week :) Thx, Norman
Re: JAMES OOM, maybe the cause of MINA ?
Forgot to include JAMES list.. 2010/4/12 Norman Maurer norman.mau...@googlemail.com: Hi Asish, yeah in our case this is fine. But I think even if this fix the problem MINA should at least try to break such loops. Bye, Norman 2010/4/12 Ashish paliwalash...@gmail.com: On Mon, Apr 12, 2010 at 1:15 PM, Norman Maurer norman.mau...@googlemail.com wrote: Hi Ashish, I bet its the loop I mention before.. This would make sense when looking at the growing queued writes. I commited a change to trunk which close the session after write the data to the client. We will see if this helps.. I hope it solves the problem :) Closing the session means disconnecting the client. If the situation wants this its fine, else need to dig a bit more for solution :) If the problem is solved, I consider its a good start for the week :) Thx, Norman
Re: JAMES OOM, maybe the cause of MINA ?
Hi Ashish, after thinkin more about the whole stuff I wonder if the exception handling in SMTP could sometimes be an endless loop. In the handler we write a message back to the client on exception. But what happens if this throw a new exception ? Could it so loop forever ? http://svn.apache.org/viewvc/james/server/trunk/smtpserver/src/main/java/org/apache/james/smtpserver/mina/SMTPIoHandler.java?revision=930014view=markup Maybe we should just close the connection.. Bye Norman 2010/4/9 Eric Charles eric.char...@u-mangate.com: Hi Ashish, I am the user who has many OOM with the trunk and feed Norman with my issues :) 1. Indeed, you have the dump with CircularQueue from mina 2.0.0-RC1. This is the release we normally use in james and give the issue after a certain period of time. I mean, the server can stay working correctly 2 days or crash after 2 hours (see http://apache.u-mangate.com/james/oom/oom.png) due to a peak in memory usage. T To further investigate, we tried with mina trunk 2.0.0-RC2-SNAPSHOT : There, we see a direct crash. I've uploaded such a dump on http://apache.u-mangate.com/james/oom/index.html (click on shift-f5 to force refresh, I setup the web server in a hurry). You will see there recursive ConcurrentLinkedQueue. 2. As shown on http://apache.u-mangate.com/james/oom/oom.png, the system works while the line is flat (mail are received, spooled, delivered,...). On a few seconds, it peaks and of course, nothing works anymore. So, the messages don't remain in the spool. I made tests with quite huge messages, and they are delivered very fast as soon as they arrive in James. Don't hesitate to ask more questions or propose additional tests. Many tks in advance, Eric On 04/09/2010 12:40 PM, Ashish wrote: Norman, Couple of more queries 1. The heap dump uses circularqueue class, so seem to be taken for an earlier trunk snapshot. Is my take correct? 2. What's the state of the System? are the clients receiving the messages. The queue seems to be holding a very large number of objects. Essentially what I want to know is, if the clients are receiving the messages or the Server is holding them up. Will spend more time with the issue and see what I can figure out. thanks ashish On Thu, Apr 8, 2010 at 2:03 PM, Norman Maurer norman.mau...@googlemail.com wrote: Maybe Eric can do, cause he is the one who see it very freqently.. So Eric...;) ? Thx, Norman 2010/4/8 Ashishpaliwalash...@gmail.com: Can you provide the heapdump for this OOM? thanks ashish On Thu, Apr 8, 2010 at 1:40 PM, Ashishpaliwalash...@gmail.com wrote: On Thu, Apr 8, 2010 at 1:28 PM, Norman Maurer norman.mau...@googlemail.com wrote: Hi Ashish, I think we tracked down the source of the problem a bit more.. The OOM seems to be related to IMAP. Our IMAP server component is using the StreamIoHandler (its the only one of our components who use this handler). So I suspect there is the problem. So there are two possible problems: 1) Bug in StreamIoHandler 2) Wrong usage of StreamIoHandler. Our implementations is here: http://svn.apache.org/viewvc/james/server/trunk/imapserver/src/main/java/org/apache/james/imapserver/mina/ImapIoHandler.java?view=markup Thx, Norman Sorry, haven't been able to look at this so far :( earliest I can give it a shot will be on Sunday. thanks ashish - To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org For additional commands, e-mail: server-dev-h...@james.apache.org
Re: JAMES OOM, maybe the cause of MINA ?
Hi Ashish, yeah ofter some more investigation it seems that it's not the StreamIoHandler which cause the problem. It must be something else... Bye Norman 2010/4/9 Ashish paliwalash...@gmail.com: Did some more investigation. Here is one of the strange observations Most of the hanging DefaultWriteRequest have this message 451 Unable to process smtp request.. Can't analyze all of them, but saw content of close to 100 objects. All of them had the same content This error is coming from org.apache.james.smtpserver.mina.SMTPIoHandler Line:94 if (session.isConnected()) { session.write(new SMTPResponse(SMTPRetCode.LOCAL_ERROR, Unable to process smtp request)); } Also, from the heapdump, all the WriteRequests are for a session (id=13609), and they are hanging there :( so seems like we have a hanging session. Any thoughts? Will try to reproduce this problem at my end. Some logs might be of help. thanks ashish On Fri, Apr 9, 2010 at 4:10 PM, Ashish paliwalash...@gmail.com wrote: Norman, Couple of more queries 1. The heap dump uses circularqueue class, so seem to be taken for an earlier trunk snapshot. Is my take correct? 2. What's the state of the System? are the clients receiving the messages. The queue seems to be holding a very large number of objects. Essentially what I want to know is, if the clients are receiving the messages or the Server is holding them up. Will spend more time with the issue and see what I can figure out. thanks ashish On Thu, Apr 8, 2010 at 2:03 PM, Norman Maurer norman.mau...@googlemail.com wrote: Maybe Eric can do, cause he is the one who see it very freqently.. So Eric...;) ? Thx, Norman 2010/4/8 Ashish paliwalash...@gmail.com: Can you provide the heapdump for this OOM? thanks ashish On Thu, Apr 8, 2010 at 1:40 PM, Ashish paliwalash...@gmail.com wrote: On Thu, Apr 8, 2010 at 1:28 PM, Norman Maurer norman.mau...@googlemail.com wrote: Hi Ashish, I think we tracked down the source of the problem a bit more.. The OOM seems to be related to IMAP. Our IMAP server component is using the StreamIoHandler (its the only one of our components who use this handler). So I suspect there is the problem. So there are two possible problems: 1) Bug in StreamIoHandler 2) Wrong usage of StreamIoHandler. Our implementations is here: http://svn.apache.org/viewvc/james/server/trunk/imapserver/src/main/java/org/apache/james/imapserver/mina/ImapIoHandler.java?view=markup Thx, Norman Sorry, haven't been able to look at this so far :( earliest I can give it a shot will be on Sunday. thanks ashish -- thanks ashish Blog: http://www.ashishpaliwal.com/blog My Photo Galleries: http://www.pbase.com/ashishpaliwal -- thanks ashish Blog: http://www.ashishpaliwal.com/blog My Photo Galleries: http://www.pbase.com/ashishpaliwal
Re: JAMES OOM, maybe the cause of MINA ?
Hi Ashish, I think we tracked down the source of the problem a bit more.. The OOM seems to be related to IMAP. Our IMAP server component is using the StreamIoHandler (its the only one of our components who use this handler). So I suspect there is the problem. So there are two possible problems: 1) Bug in StreamIoHandler 2) Wrong usage of StreamIoHandler. Our implementations is here: http://svn.apache.org/viewvc/james/server/trunk/imapserver/src/main/java/org/apache/james/imapserver/mina/ImapIoHandler.java?view=markup Thx, Norman 2010/4/5 Eric Charles eric.char...@u-mangate.com: Yes, One instance of org.apache.mina.core.session.DefaultIoSessionDataStructureFactory$DefaultWriteRequestQueue contains : - for 2.0.0-RC1 : one instance of org.apache.mina.util.CircularQueue with an array of many org.apache.mina.filter.codec.ProtocolCodecFilter$EncodedWriteRequest - for 2.0.0-RC2-SNAPSHOT : many recursive instances of java.util.concurrent.ConcurrentLinkedQueue Tks, Eric On 04/05/2010 10:51 AM, Norman Maurer wrote: I think thats only because mina-trunk is not using CircularQueue anymore. It now seems to use ConcurrentLinkedQueue. Bye, Norman 2010/4/5 Eric Charleseric.char...@u-mangate.com: Hi Ashish, Please also note that we have 2 different exceptions: - http://people.apache.org/~norman/oom/Screenshot.png that occurs with mina 2.0.0-RC1 - http://people.apache.org/~norman/oom/Screenshot-Eclipse_Memory_Analyzer.png that occurs with 2.0.0-RC2-SNAPSHOT It happens on jdk 1.6 (and also 1.7) Tks, Eric On 04/05/2010 10:01 AM, Ashish wrote: Thanks Norman, Will try to see this as soon as I can get some time from paid job :) cheers ashish On Mon, Apr 5, 2010 at 1:27 PM, Norman Maurer norman.mau...@googlemail.com wrote: Hi Ashish, thx for your reply. The problem is sometimes it takes sometime to get the OOM, other times it happens within one minute. One of our users reported to me that it happened within 1 minute (10 seconds and 30 seconds), after he switched to MINA trunk. So it seems it is faster reproducable with MINA trunk. I uploaded the screenshot of Eclipse Memory Analyzer to : http://people.apache.org/~norman/oom/Screenshot-Eclipse_Memory_Analyzer.png This was the one we got with MINA trunk. So you it again shows all the memory allocated by MINA. To reproduce the OOM you must perform the following steps: 1) svn checkout http://svn.apache.org/repos/asf/server/trunk james-trunk 2) cd james-trunk 2) mvn clean package 3) tar xfvz spring-deployment/target/james-spring-deployment-3.0-M1-bin.tar.gz 4) cd james-string-deploymnet-3.0-M1/bin 5) sudo ./run.sh 6) telnet localhost 4555 (user root, pass root) 7) adduser test test 8) quit Now bomb the server with emails. You can use for example smtp-source for it (wich is included in postfix) 9) smtp-source -s 20 -l 10100 -m 20 -c -f t...@test.de -t test localhost:25 This will bomb the servers with 20 emails with 20 concurrent sessions. Hope this helps, Bye, Norman 2010/4/5 Ashishpaliwalash...@gmail.com: On Sun, Apr 4, 2010 at 12:59 AM, Norman Maurernor...@apache.org wrote: Hi all, we at JAMES use MINA since a while now for our socket stuff. After doing some stress tests we encountered some OOM Exceptions. The same was seen by one of our users which use JAMES trunk. After debugging stuff it seems like the cause of the OOM is MINA. We took some heap which shows that MINA is takin the most memory. The class which shows the memory usage was: org.apache.mina.filter.codec.ProtocolCodecFilter$EncodedWriteRequest I attach the screnshots which shows the problem. Any idea ? We are using MINA-2.0.0-RC1. Maybe I'm wrong and the whole OOM is not related to MINA at all.. Thanks, Norman Ps: Please keep server-dev in the cc Norman, Is there a way to reproduce this? I just want to try it out myself and debug. -- thanks ashish Blog: http://www.ashishpaliwal.com/blog My Photo Galleries: http://www.pbase.com/ashishpaliwal - To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org For additional commands, e-mail: server-dev-h...@james.apache.org - To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org For additional commands, e-mail: server-dev-h...@james.apache.org - To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org For additional commands, e-mail: server-dev-h...@james.apache.org
Re: JAMES OOM, maybe the cause of MINA ?
Maybe Eric can do, cause he is the one who see it very freqently.. So Eric...;) ? Thx, Norman 2010/4/8 Ashish paliwalash...@gmail.com: Can you provide the heapdump for this OOM? thanks ashish On Thu, Apr 8, 2010 at 1:40 PM, Ashish paliwalash...@gmail.com wrote: On Thu, Apr 8, 2010 at 1:28 PM, Norman Maurer norman.mau...@googlemail.com wrote: Hi Ashish, I think we tracked down the source of the problem a bit more.. The OOM seems to be related to IMAP. Our IMAP server component is using the StreamIoHandler (its the only one of our components who use this handler). So I suspect there is the problem. So there are two possible problems: 1) Bug in StreamIoHandler 2) Wrong usage of StreamIoHandler. Our implementations is here: http://svn.apache.org/viewvc/james/server/trunk/imapserver/src/main/java/org/apache/james/imapserver/mina/ImapIoHandler.java?view=markup Thx, Norman Sorry, haven't been able to look at this so far :( earliest I can give it a shot will be on Sunday. thanks ashish
Re: Spring Integration
Hi Andreas, I'm not a mina dev but I'm sure they love patches which make the code more usable ;) Bye, Norman 2010/4/7 Andreas Sahlbach andreas.sahlb...@gmail.com: Hi guys! I am a new user of your framework (great stuff!) and I have a short question regarding the spring framework. I am using mina 2.x and noticed that you removed a lot of special spring stuff in favor of a more general support for injection frameworks. Still there are a number of classes in the framework that are pretty spring-unfriendly and cannot be used from within spring without user modifications (like extending them or wrapping them). So my question is: What is your midterm plans regarding spring integration? Are you going to modify your classes so that they can be easily from within spring? If so, should I file a bug (with patch) for classes that don't work currently? Or are you going to implement more helper classes in the xbean package? I am referring for example to DemuxingProtocolCodecFactory or DemuxingIoHandler, which can't be initialized easily from within spring. Best regards, Andreas -- Andreas Sahlbach
Re: JAMES OOM, maybe the cause of MINA ?
Hi Ashish, thx for your reply. The problem is sometimes it takes sometime to get the OOM, other times it happens within one minute. One of our users reported to me that it happened within 1 minute (10 seconds and 30 seconds), after he switched to MINA trunk. So it seems it is faster reproducable with MINA trunk. I uploaded the screenshot of Eclipse Memory Analyzer to : http://people.apache.org/~norman/oom/Screenshot-Eclipse_Memory_Analyzer.png This was the one we got with MINA trunk. So you it again shows all the memory allocated by MINA. To reproduce the OOM you must perform the following steps: 1) svn checkout http://svn.apache.org/repos/asf/server/trunk james-trunk 2) cd james-trunk 2) mvn clean package 3) tar xfvz spring-deployment/target/james-spring-deployment-3.0-M1-bin.tar.gz 4) cd james-string-deploymnet-3.0-M1/bin 5) sudo ./run.sh 6) telnet localhost 4555 (user root, pass root) 7) adduser test test 8) quit Now bomb the server with emails. You can use for example smtp-source for it (wich is included in postfix) 9) smtp-source -s 20 -l 10100 -m 20 -c -f t...@test.de -t test localhost:25 This will bomb the servers with 20 emails with 20 concurrent sessions. Hope this helps, Bye, Norman 2010/4/5 Ashish paliwalash...@gmail.com: On Sun, Apr 4, 2010 at 12:59 AM, Norman Maurer nor...@apache.org wrote: Hi all, we at JAMES use MINA since a while now for our socket stuff. After doing some stress tests we encountered some OOM Exceptions. The same was seen by one of our users which use JAMES trunk. After debugging stuff it seems like the cause of the OOM is MINA. We took some heap which shows that MINA is takin the most memory. The class which shows the memory usage was: org.apache.mina.filter.codec.ProtocolCodecFilter$EncodedWriteRequest I attach the screnshots which shows the problem. Any idea ? We are using MINA-2.0.0-RC1. Maybe I'm wrong and the whole OOM is not related to MINA at all.. Thanks, Norman Ps: Please keep server-dev in the cc Norman, Is there a way to reproduce this? I just want to try it out myself and debug. -- thanks ashish Blog: http://www.ashishpaliwal.com/blog My Photo Galleries: http://www.pbase.com/ashishpaliwal
Re: JAMES OOM, maybe the cause of MINA ?
I think thats only because mina-trunk is not using CircularQueue anymore. It now seems to use ConcurrentLinkedQueue. Bye, Norman 2010/4/5 Eric Charles eric.char...@u-mangate.com: Hi Ashish, Please also note that we have 2 different exceptions: - http://people.apache.org/~norman/oom/Screenshot.png that occurs with mina 2.0.0-RC1 - http://people.apache.org/~norman/oom/Screenshot-Eclipse_Memory_Analyzer.png that occurs with 2.0.0-RC2-SNAPSHOT It happens on jdk 1.6 (and also 1.7) Tks, Eric On 04/05/2010 10:01 AM, Ashish wrote: Thanks Norman, Will try to see this as soon as I can get some time from paid job :) cheers ashish On Mon, Apr 5, 2010 at 1:27 PM, Norman Maurer norman.mau...@googlemail.com wrote: Hi Ashish, thx for your reply. The problem is sometimes it takes sometime to get the OOM, other times it happens within one minute. One of our users reported to me that it happened within 1 minute (10 seconds and 30 seconds), after he switched to MINA trunk. So it seems it is faster reproducable with MINA trunk. I uploaded the screenshot of Eclipse Memory Analyzer to : http://people.apache.org/~norman/oom/Screenshot-Eclipse_Memory_Analyzer.png This was the one we got with MINA trunk. So you it again shows all the memory allocated by MINA. To reproduce the OOM you must perform the following steps: 1) svn checkout http://svn.apache.org/repos/asf/server/trunk james-trunk 2) cd james-trunk 2) mvn clean package 3) tar xfvz spring-deployment/target/james-spring-deployment-3.0-M1-bin.tar.gz 4) cd james-string-deploymnet-3.0-M1/bin 5) sudo ./run.sh 6) telnet localhost 4555 (user root, pass root) 7) adduser test test 8) quit Now bomb the server with emails. You can use for example smtp-source for it (wich is included in postfix) 9) smtp-source -s 20 -l 10100 -m 20 -c -f t...@test.de -t test localhost:25 This will bomb the servers with 20 emails with 20 concurrent sessions. Hope this helps, Bye, Norman 2010/4/5 Ashishpaliwalash...@gmail.com: On Sun, Apr 4, 2010 at 12:59 AM, Norman Maurernor...@apache.org wrote: Hi all, we at JAMES use MINA since a while now for our socket stuff. After doing some stress tests we encountered some OOM Exceptions. The same was seen by one of our users which use JAMES trunk. After debugging stuff it seems like the cause of the OOM is MINA. We took some heap which shows that MINA is takin the most memory. The class which shows the memory usage was: org.apache.mina.filter.codec.ProtocolCodecFilter$EncodedWriteRequest I attach the screnshots which shows the problem. Any idea ? We are using MINA-2.0.0-RC1. Maybe I'm wrong and the whole OOM is not related to MINA at all.. Thanks, Norman Ps: Please keep server-dev in the cc Norman, Is there a way to reproduce this? I just want to try it out myself and debug. -- thanks ashish Blog: http://www.ashishpaliwal.com/blog My Photo Galleries: http://www.pbase.com/ashishpaliwal - To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org For additional commands, e-mail: server-dev-h...@james.apache.org
JAMES OOM, maybe the cause of MINA ?
Hi all, we at JAMES use MINA since a while now for our socket stuff. After doing some stress tests we encountered some OOM Exceptions. The same was seen by one of our users which use JAMES trunk. After debugging stuff it seems like the cause of the OOM is MINA. We took some heap which shows that MINA is takin the most memory. The class which shows the memory usage was: org.apache.mina.filter.codec.ProtocolCodecFilter$EncodedWriteRequest I attach the screnshots which shows the problem. Any idea ? We are using MINA-2.0.0-RC1. Maybe I'm wrong and the whole OOM is not related to MINA at all.. Thanks, Norman Ps: Please keep server-dev in the cc
Re: JAMES OOM, maybe the cause of MINA ?
I should think of the attachment stripping on the ml.. You can find the screenshots here: http://people.apache.org/~norman/oom/ Bye, Norman 2010/4/3 Norman Maurer nor...@apache.org: Hi all, we at JAMES use MINA since a while now for our socket stuff. After doing some stress tests we encountered some OOM Exceptions. The same was seen by one of our users which use JAMES trunk. After debugging stuff it seems like the cause of the OOM is MINA. We took some heap which shows that MINA is takin the most memory. The class which shows the memory usage was: org.apache.mina.filter.codec.ProtocolCodecFilter$EncodedWriteRequest I attach the screnshots which shows the problem. Any idea ? We are using MINA-2.0.0-RC1. Maybe I'm wrong and the whole OOM is not related to MINA at all.. Thanks, Norman Ps: Please keep server-dev in the cc
Re: Infinityloop on exception when using StreamIoHandler
Hi Emmanuel, so do you think its related to MINA or to JAMES ? I'm still not sure if I should open a bug report for MINA... Thx, Norman 2010/3/3 Norman Maurer nor...@apache.org: So you think it's a bug in MINA ? We are using RC1. forgot to mention that. Thx Norman 2010/3/3, Emmanuel Lecharny elecha...@gmail.com: On 3/3/10 2:57 PM, Norman Maurer wrote: Hi all, at JAMES we use a StreamIoHandler for our IMAPServer stuff. Now a user reported a infinityloop wheb he close his thunderbird. After lookin at the stacktrace I'm tend to think its a bug in MINA. Could some of the devs have a look ? sure, will do. Can you feel a JIRA so that we can track the progress of this bug ? Are you using trunk or RC1 ?-- Regards, Cordialement, Emmanuel Lécharny www.nextury.com
Re: Infinityloop on exception when using StreamIoHandler
Just to give you some update I was able to fix this problem by using session.close(true) and not session.close(false) on an Exception. Thx, Norman 2010/3/4 Norman Maurer nor...@apache.org: Hi Emmanuel, so do you think its related to MINA or to JAMES ? I'm still not sure if I should open a bug report for MINA... Thx, Norman 2010/3/3 Norman Maurer nor...@apache.org: So you think it's a bug in MINA ? We are using RC1. forgot to mention that. Thx Norman 2010/3/3, Emmanuel Lecharny elecha...@gmail.com: On 3/3/10 2:57 PM, Norman Maurer wrote: Hi all, at JAMES we use a StreamIoHandler for our IMAPServer stuff. Now a user reported a infinityloop wheb he close his thunderbird. After lookin at the stacktrace I'm tend to think its a bug in MINA. Could some of the devs have a look ? sure, will do. Can you feel a JIRA so that we can track the progress of this bug ? Are you using trunk or RC1 ?-- Regards, Cordialement, Emmanuel Lécharny www.nextury.com
[jira] Commented: (VYSPER-184) Make build create pret-a-porter start scripts for the server
[ https://issues.apache.org/jira/browse/VYSPER-184?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12841719#action_12841719 ] Norman Maurer commented on VYSPER-184: -- I would suggest you to look at appassembler maven module for this. http://mojo.codehaus.org/appassembler/appassembler-maven-plugin/ We use it at JAMES and its really easy and straight forward :) Make build create pret-a-porter start scripts for the server Key: VYSPER-184 URL: https://issues.apache.org/jira/browse/VYSPER-184 Project: VYSPER Issue Type: Improvement Reporter: Bernd Fondermann Assignee: Bernd Fondermann -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
Infinityloop on exception when using StreamIoHandler
Hi all, at JAMES we use a StreamIoHandler for our IMAPServer stuff. Now a user reported a infinityloop wheb he close his thunderbird. After lookin at the stacktrace I'm tend to think its a bug in MINA. Could some of the devs have a look ? All details are here (including stacktrace): https://issues.apache.org/jira/browse/JAMES-979?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel Source code of the handler: http://svn.apache.org/repos/asf/james/server/trunk/imapserver/src/main/java/org/apache/james/imapserver/mina/ImapIoHandler.java Thx a bunch, Norman
Re: Infinityloop on exception when using StreamIoHandler
So you think it's a bug in MINA ? We are using RC1. forgot to mention that. Thx Norman 2010/3/3, Emmanuel Lecharny elecha...@gmail.com: On 3/3/10 2:57 PM, Norman Maurer wrote: Hi all, at JAMES we use a StreamIoHandler for our IMAPServer stuff. Now a user reported a infinityloop wheb he close his thunderbird. After lookin at the stacktrace I'm tend to think its a bug in MINA. Could some of the devs have a look ? sure, will do. Can you feel a JIRA so that we can track the progress of this bug ? Are you using trunk or RC1 ?-- Regards, Cordialement, Emmanuel Lécharny www.nextury.com
Re: ProtocolCodecFilter and private getDecoder(IoSession) method
I refer to the ProtocolCodecFilter class in MINA 2.0-RC1. Bye, Norman 2010/2/19 Emmanuel Lecharny elecha...@gmail.com: On 2/18/10 6:57 PM, Norman Maurer wrote: Hi all, Hi Norman, why is this method declared private ? /** * Get the decoder instance from a given session. * * @param session The associated session we will get the decoder from * @return The decoder instance */ private ProtocolDecoder getDecoder(IoSession session) { return (ProtocolDecoder) session.getAttribute(DECODER); } The getEncoder method is declared public. I don't know what version of MINA you are refering to, nor which class (we have 20 references for this method in the whole MINA code), but in trunk, there are no such private method anymore. Blind guess : at some point, someone did something wrong and someone else fixed it. I may have been the two persons ;) Bye, Norman -- Regards, Cordialement, Emmanuel Lécharny www.nextury.com
ProtocolCodecFilter and private getDecoder(IoSession) method
Hi all, why is this method declared private ? /** * Get the decoder instance from a given session. * * @param session The associated session we will get the decoder from * @return The decoder instance */ private ProtocolDecoder getDecoder(IoSession session) { return (ProtocolDecoder) session.getAttribute(DECODER); } The getEncoder method is declared public. Bye, Norman
Re: MINA2 space
Works for me too.. Bye, Norman 2010/2/9 Ashish paliwalash...@gmail.com: Seems I am out of luck :-( the login page doesn't show up.. On Tue, Feb 9, 2010 at 4:54 PM, Emmanuel Lecharny elecha...@gmail.com wrote: On 2/9/10 12:11 PM, Ashish wrote: What happened to our new MINA2 space? I logged half an hr back, but couldn't locate it :-( Now having trouble logging in. Anyone experiencing the same problems? thanks ashish and the wiki : http://cwiki.apache.org/confluence/display/MINA2/Index -- Regards, Cordialement, Emmanuel Lécharny www.nextury.com -- thanks ashish Blog: http://www.ashishpaliwal.com/blog My Photo Galleries: http://www.pbase.com/ashishpaliwal
JAMES switched to use MINA for Sockets
Just some heads-up, JAMES (james.apache.org) recently changed the whole socket-code to use MINA 2.0.0-RC1 only. MINA now replaces the old socket implementation which was cornerstone-sockets. I must say so far it really works perfect for IMAP/SMTP/POP3. Thx again for the hard work and we are looking for the final 2.0 release! Bye, Norman
Re: [MINA 3.0] Initial thoughts on FilterChain
Well I'm not a MINA committer but I would keep the Filter naming. Like Emanuell said, its a well known pattern. Bye, Norman 2009/11/26 Julien Vermillard jvermill...@archean.fr: Le Thu, 26 Nov 2009 15:55:57 +0530, Ashish paliwalash...@gmail.com a écrit : Have started looking into the FilterChain implementation and here are some initial thoughts 1. Rename IoFilterChain as IoChannel - it gives a more clear picture and is easy to understand like imagine as a Channel with multiple stages aka IoFilters. This came while I was drawing on paper to design something. I propose IoPipe/IoPipeline, because for me a bunch of filter stacked on each other is a Pipe in the Unix meaning. 2. Have captured a couple of API's that are core to IoChannel IoSession getSession(); IoFilter getHead(); IoFilter getNextFilter(IoFilter currentFilter); ListIoFilter getAll(); void addFilter(String name, IoFilter filter); void addAfter(String baseName, String filterName, IoFilter filter); void removeFilter(String filterName); There are a lot more API's in current implementation. I am not sure if we need replace API or not. Also do we need the Generics version of these API's or its fine without them? This is just the initial list. Will checkin the files once the name change is OK with everyone.
Problems with TextLineCodecFactory in SMTPServer
Hi all, we started to use MINA in the JAMES SMTPServer. Everything works in most cases, but sometimes I see the following error message: org.apache.mina.filter.codec.ProtocolDecoderException: java.nio.charset.MalformedInputException: Input length = 1 (Hexdump: 22 74 6F 70 22 20 68 65 69 67 68 74 3D 22 32 30 22 20 62 67 63 6F 6C 6F 72 3D 22 23 39 39 30 30 30 30 22 3E 26 6E 62 73 70 3B 3C 2F 74 64 3E 0D 0A 3C 2F 74 72 3E 0D 0A 3C 74 72 20 68 65 69 67 68 74 3D 22 32 30 22 3E 20 0D 0A 3C 74 64 20 76 61 6C 69 67 6E 3D 22 74 6F 70 22 20 68 65 69 67 68 74 3D 22 32 30 22 20 62 67 63 6F 6C 6F 72 3D 22 23 39 39 30 30 30 30 22 20 61 6C 69 67 6E 3D 22 63 65 6E 74 65 72 22 3E 20 0D 0A 3C 70 3E 3C 62 3E 3C 66 6F 6E 74 20 63 6F 6C 6F 72 3D 22 23 46 46 46 46 46 46 22 3E 34 20 ED EE FF E1 F0 FF 20 32 30 30 39 20 E3 2E 3C 62 72 3E 3C 62 72 3E 3C 2F 66 6F 6E 74 3E 3C 2F 62 3E 3C 66 6F 6E 74 20 66 61 63 65 3D 22 54 61 68 6F 6D 61 22 20 73 69 7A 65 3D 22 34 22 20 63 6F 6C 6F 72 3D 22 23 46 46 46 46 46 46 22 3E 3C 62 3E 09 0D 0A D7 F2 EE 20 ED F3 E6 ED EE 20 E7 ED E0 F2 FC 20 D7 C0 D1 D2 CD CE CC D3 20 CF D0 C5 C4 CF D0 C8 CD C8 CC C0 D2 C5 CB DE 3A 20 3C 2F 66 6F 6E 74 3E 0D 0A 3C 70 20 61 6C 69 67 6E 3D 6C 65 66 74 20 3E 3C 66 6F 6E 74 20 66 61 63 65 3D 22 54 61 68 6F 6D 61 22 20 73 69 7A 65 3D 22 32 22 20 63 6F 6C 6F 72 3D 22 23 46 46 46 46 46 46 22 3E 3C 62 3E 3C 62 72 3E 3C 62 72 3E 0D 0A 26 6E 62 73 70 3B 26 6E 62 73 70 3B 26 6E 62 73 70 3B 26 6E 62 73 70 3B 95 20 C2 EA EB FE F7 E5 ED E8 E5 20 E2 20 E2 FB F0 F3 F7 EA F3 20 EF EE F1 F0 E5 E4 ED E8 EA EE E2 20 F2 EE EB FC EA EE 20 EA EE EC E8 F1 F1 E8 EE ED ED EE E3 EE 20 E2 EE E7 ED E0 E3 F0 E0 E6 E4 E5 ED E8 FF 3A 20 3C 62 72 3E 0D 0A 26 6E 62 73 70 3B 26 6E 62 73 70 3B 26 6E 62 73 70 3B 26 6E 62 73 70 3B ED EE E2 FB E5 20 E0 F0 E3 F3 EC E5 ED F2 FB 2C 20 EF E8 F1 FC EC E0 20 C3 CD C0 D3 20 F1 20 E8 FE EB FF 20 32 30 30 39 2E 3C 62 72 3E 3C 62 72 3E 0D 0A 26 6E 62 73 70 3B 26 6E 62 73 70 3B 26 6E 62 73 70 3B 26 6E 62 73 70 3B 95 20 C2 FB E4 E0 F7 E0 20 E4 EE EA 2D F2 EE E2 20 ED E0 20 EF EE EA F3 EF EA F3 20 F2 EE E2 E0 F0 E0 20 28 F3 F1 EB F3 E3 29 20 96 20 ED EE E2 E0 FF 20 EF F0 E0 EA F2 E8 EA E0 20 EF F0 EE E2 E5 F0 EE EA 20 F1 20 EC E0 FF 20 32 30 30 39 2C 20 3C 62 72 3E 3C 62 72 3E 0D 0A 26 6E 62 73 70 3B 26 6E 62 73 70 3B 26 6E 62 73 70 3B 26 6E 62 73 70 3B 95 20 CE F2 F0 E0 E6 E5 ED E8 E5 20 E2 FB F0 F3 F7 EA E8 20 EF EE F1 EB E5 20 EA E0 E6 E4 EE E9 20 EE EF E5 F0 E0 F6 E8 E8 3A 20 EE F2 EA F3 E4 E0 20 E2 E7 FF EB EE F1 FC 20 F2 F0 E5 E1 EE E2 E0 ED E8 E5 2C 20 3C 62 72 3E 3C 62 72 3E 0D 0A 26 6E 62 73 70 3B 26 6E 62 73 70 3B 26 6E 62 73 70 3B 26 6E 62 73 70 3B 95 20 D8 F2 F0 E0 F4 20 E7 E0 20 ED E5 20 F3 F7 E5 F2 20 F2 EE E2 E0 F0 ED EE 2D EC E0 F2 E5 F0 E8 E0 EB FC ED FB F5 20 F6 E5 ED ED EE F1 F2 E5 E9 20 3C 62 72 3E 0D 0A 26 6E 62 73 70 3B 26 6E 62 73 70 3B 26 6E 62 73 70 3B 26 6E 62 73 70 3B 2D 20 EF EE F7 E5 EC F3 20 EF EE EA E0 20 F0 E5 E4 EA EE 20 EF F0 E8 EC E5 ED FF E5 F2 F1 FF 20 ED E0 20 EF F0 E0 EA F2 E8 EA E5 2C 3C 62 72 3E 0D 0A 26 6E 62 73 70 3B 26 6E 62 73 70 3B 26 6E 62 73 70 3B 26 6E 62 73 70 3B EE F2 F1 F3 F2 F1 F2 E2 E8 E5 20 E4 EE EA F3 EC E5 ED F2 EE E2 20 ED E0 20 EF F0 E8 F5 EE E4 20 F2 EE E2 E0 F0 E0 2C 20 3C 62 72 3E 3C 62 72 3E 0D 0A 26 6E 62 73 70 3B 26 6E 62 73 70 3B 26 6E 62 73 70 3B 26 6E 62 73 70 3B 95 20 D1 EE E2 EC E5 F1 F2 ED E0 FF 20 E4 E5 FF F2 E5 EB FC ED EE F1 F2 FC 20 E3 F0 F3 EF EF FB 20 F7 E0 F1 F2 ED FB F5 20 EF F0 E5 E4 EF F0 E8 ED E8 EC E0 F2 E5 EB E5 E9 3A 20 3C 62 72 3E 0D 0A 26 6E 62 73 70 3B 26 6E 62 73 70 3B 26 6E 62 73 70 3B 26 6E 62 73 70 3B F7 F2 EE 20 ED E8 20 E2 20 EA EE E5 EC 20 F1 EB F3 F7 E0 E5 20 ED E5 EB FC E7 FF 20 EF EE EA E0 E7 FB E2 E0 F2 FC 2C 20 3C 62 72 3E 0D 0A 26 6E 62 73 70 3B 26 6E 62 73 70 3B 26 6E 62 73 70 3B 26 6E 62 73 70 3B F0 E0 E1 EE F2 E0 20 EF EE E4 20 EE E4 ED EE E9 20 F2 EE F0 E3 EE E2 EE E9 20 EC E0 F0 EA EE E9 2C 20 F4 F0 E0 ED F7 E0 E9 E7 E8 ED E3 2E 3C 62 72 3E 3C 62 72 3E 0D 0A 26 6E 62 73 70 3B 26 6E 62 73 70 3B 26 6E 62 73 70 3B 26 6E 62 73 70 3B 95 20 D4 CE CF 2F C4 E8 F0 E5 EA F2 EE F0 2F D3 F7 F0 E5 E4 E8 F2 E5 EB FC 2D 20 E2 20 EE E4 ED EE EC 20 EB E8 F6 E5 3A 20 ED E0 20 F7 F2 EE 20 EE E1 F0 E0 F2 E8 F2 FC 20 E2 ED E8 EC E0 ED E8 E5 2E 3C 62 72 3E 3C 62 72 3E 0D 0A 26 6E 62 73 70 3B 26 6E 62 73 70 3B 26 6E 62 73 70 3B 26 6E 62 73 70 3B 95 20 CF EE F0 FF E4 EE EA 20 EF F0 EE E2 E5 F0 EA E8 20 D4 CE CF 2E 20 CA E0 EA 20 EC EE E6 ED EE 20 EE E1 E6 E0 EB EE E2 E0 F2 FC 20 E0 EA F2 20 EF F0 EE E2 E5 F0 EA E8 2E 20 3C 62 72 3E 3C 62 72 3E 0D 0A 26 6E 62 73 70 3B 26 6E 62 73 70 3B 26 6E 62) at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:235) at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:433) at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:47) at
Re: [3.0] IoSession attachment
I'm not a mina developer but here is my +1. Bye, Norman 2009/10/26 Julien Vermillard jvermill...@archean.fr: Le Mon, 26 Oct 2009 13:31:20 +0100, Emmanuel Lecharny elecha...@apache.org a écrit : I would go with only those methods (applying the KISS principle) Object getAttribute(Object key); Object setAttribute(Object key, Object value); Object removeAttribute(Object key); boolean containsAttribute(Object key); SetObject getAttributeKeys(); Everything else is just overkilling, IMHO. It's my POV too, but I wanted to see what others have to say without influencing. Julien
Re: JAMES now use MINA
Hi Julien, we use the normal TextLineCodecFactory + an IoFilter to transform the text line to an SMTPRequest object. Bye, Norman 2009/10/19 Julien Vermillard jvermill...@archean.fr: Le Fri, 16 Oct 2009 17:10:40 +0200, Norman Maurer nor...@apache.org a écrit : Hi all, I just wanted to give you some heads up. I'm currently work on moving JAMES trunk over to MINA. The first component is now workin. JAMES now offers a async SMTPServer using MINA and a normal SMTPServer using Excalibur. I plan to add support for MINA on the other components as well, which includes POP3Server, IMAPServer, RemoteManager and NNTPServer. So far MINA is workin great. Thx for the hard work. PS: We are using 2.0.0-M6 Nice to hear :) Just for my curiosity, do you use MINA ProtocolCodecFilter ? I suppose you share your codec between your two server (MINA based one and the Excalibur one)so it's probably not a MINA based codec. Julien
JAMES now use MINA
Hi all, I just wanted to give you some heads up. I'm currently work on moving JAMES trunk over to MINA. The first component is now workin. JAMES now offers a async SMTPServer using MINA and a normal SMTPServer using Excalibur. I plan to add support for MINA on the other components as well, which includes POP3Server, IMAPServer, RemoteManager and NNTPServer. So far MINA is workin great. Thx for the hard work. PS: We are using 2.0.0-M6
Re: P2P Audio / Video streaming
Hi, maybe its a bit diffrent but I wrote a TCPSoundStreamer with MINA. I use BARIX Hardware on the other side which handle raw TCP Streams and stream the mp3 via MINA as client. I use the StreanerWriteFilter to stream the mp3 ( which is stored in mysql). If you have concrete questions just ask ;-) bye Norman Pat Chang - 1973 schrieb: I think streaming the data over UDP is the solution. I am not too sure how to do it with Mina though! Block wise of shooting data will probably deteriorate the performance down and may not be the optimal way to do it. I think Java provides a interesting way to do the audio / video streaming. Since Mina offers a nice platform to program, we have considered it. Adam Fisk-3 wrote: Don't you still need to write it in some form of blocks, though? What would you do with raw UDP sockets that would be any different? On 9/5/07, Pat Chang - 1973 [EMAIL PROTECTED] wrote: Hi Friends, We are planning to build a P2P audio / video, client / server application. The question is: Here, since we are not sending data in blocks using session.write(), we need to stream the audio / video data as they arrive from the microphones. Taking the same chat example, would it be possible for us to build a P2P audio / video streaming client / server? What do you advise? Pat -- View this message in context: http://www.nabble.com/P2P-Audio---Video-streaming-tf4382175s16868.html#a12492300 Sent from the Apache MINA Support Forum mailing list archive at Nabble.com .
suspend/resume sessionOpen
Hi all, I wrote some prototype for streaming mp3 (tcp) to a BARIX device. All works well so far :-) Now I want to get sure that only one stream is send to the device at once. So I thought about pause the new connection if it comes from the same ip and resume it after the old connection was closed. Is it possible todo something like this ? Or should i better use IoSession.setTrafficMask(..) to suspend / resume write to the device ? Any help is welcome. bye Norman
Re: Fwd: Re: Writing a Server to stream mp3 via UDP
Hi Pierre, after setting the option it seems to sent the whole time. But it seems to overload the device. I still notice problems with stuck sound. Is there any way I could throttle the outgoing traffic so it whould not overload the device ? bye Norman On Tue, 10 Jul 2007 14:30:07 +0200, Pierre-Louis Bonicoli [EMAIL PROTECTED] wrote: Norman Maurer wrote: I just noticed that I only sent Stefano the answer... Original Message Subject: Re: Writing a Server to stream mp3 via UDP Date: Tue, 10 Jul 2007 11:55:44 + From: Norman Maurer [EMAIL PROTECTED] To: Stefano Bagnara [EMAIL PROTECTED] Hi Stefano, I figured out today that i can use tcp too. So i wrote some code to stream it via raw tcp. At the first it works better then with udp. But I still seem to have problems when writing to the device. I see that the LED of the ethernet device is lighting all the time when writing to it till some point is reached and it pause for a small time. Till the time the stream stuck. After it start again all works again. I attached the LoggingFilter and see that MINA really stops sending data in this time. I only not understand why... I used a StreamWriteFilter to stream write the InputStream directly. I used a writeBufferSize of 4 ( I had bad results with a bigger one). Anything I miss ? Any idea why mina stops the write ? Maybe the buffer of the device is just full ? bye Norman maybe a solution : you can disable Nagle's algorithm by a call to SocketSessionConfig.*setTcpNoDelay*, e.g.: ((SocketSessionConfig) connector.getSessionConfig()).*setTcpNoDelay*(true) http://en.wikipedia.org/wiki/Nagle_algorithm Pierre-Louis On Tue, 10 Jul 2007 13:32:52 +0200, Stefano Bagnara [EMAIL PROTECTED] wrote: Hi Norman, As someone else already replied in udp you have to manually check for ordering and retransmissions. The is no raw protocol for mp3 streaming, so you should read the manual for the appliance you bought and maybe it does explain how to manage the protocol. Stefano Norman Maurer ha scritto: Hi all, we bought some device which recieve mp3 streams via udp (raw) as a prototype. Now we want to build an app which streams some raw udp data to this device. I wrote some quick code with mina. The good news is that it play some sound, the bad is that the sound seems to stuck and is not in the right order. I tried to use StreamWriteFilter to write directly the given InputStream. I think I need to suspend the write when the buffer of the device is full. But how can i detect this ? Any idea ? The second problem which is that I have no idea howto calculate the paket sizes which i need to use for the various mp3 bitrates. Any help is welcome :-) bye Norman !DSPAM:1,46937c18240378940419379!
Writing a Server to stream mp3 via UDP
Hi all, we bought some device which recieve mp3 streams via udp (raw) as a prototype. Now we want to build an app which streams some raw udp data to this device. I wrote some quick code with mina. The good news is that it play some sound, the bad is that the sound seems to stuck and is not in the right order. I tried to use StreamWriteFilter to write directly the given InputStream. I think I need to suspend the write when the buffer of the device is full. But how can i detect this ? Any idea ? The second problem which is that I have no idea howto calculate the paket sizes which i need to use for the various mp3 bitrates. Any help is welcome :-) bye Norman
SocketAcceptor and Spring
Hi all, im using mina in a test project at the moment. Now after reading the docs about the ThreadModel i want to change the used SocketAcceptor like descripted in the documentation. In the docs is: IoAcceptor acceptor = new SocketAcceptor(Runtime.getRuntime().availableProcessors() + 1, Executors.newCachedThreadPool()); Now i wonder how i can do this with Spring.. Anyone can help ? bye Norman
Re: SVN URL?
Jeroen Brattinga schrieb: Could anyone tell me the SVN URL for Mina Trunk? Somehow I can't reach it through http://svn.apache.org/mina/trunk ... Here you go: http://svn.apache.org/repos/asf/mina/trunk/ bye Norman