3 Replies Latest reply on Oct 6, 2008 4:51 AM by (nikhil_shah)

    Tomcat/LCDS/Flex/RTMP File Descriptor Leak

      I have an application using Flex 3 and RTMP for real time updating running on CentOS and Tomcat 5.5. However, as this product has grown I am seeing an increasing problem with file descriptors. When the connection is close by any means the RTMP port is left open but changes state to "can't identify protocol" according to lsof. WHen I say "by any means" I mean actually closing the connection in flex with .close(), garbage collection, or network disconnect. This "can't identify protocol" remains open until tomcat is restarted. Because it remains open until tomcat is restarted eventually connections are refused because their are insufficient file descriptors. I have increased the number of allowed file descriptors but the problem is that is only a bandaid solution. As the program continues to grow I will have to continue to increase the number of file descriptors.

      Does anyone have any thoughts on why this RTMP connection may be sticking around?
        • 1. Re: Tomcat/LCDS/Flex/RTMP File Descriptor Leak
          Level 1
          Anson,

          We have not seen this behavior with LCDS and RTMP. I would suspect the JVM
          and/or the OS might have a problem as we believe that we close down the
          sockets correctly in our Java code.

          I will note that for LCDS we do not support (and have not tested) the CentOS
          flavor of Linux.

          --
          Tom Jordahl
          Adobe
          • 2. Re: Tomcat/LCDS/Flex/RTMP File Descriptor Leak
            Also experiencing this error. When accessing the SWF embedded flash page that opened a RTMP connection to the server the number of file descriptors grows. Each time the page is reloaded, a new file handler is created, however these are never recycled and eventually the application stops working.

            /usr/sbin/lsof -p 17168 | grep 'identify protocol'
            java 17168 tomcat 6u sock 0,5 1309987 can't identify protocol
            java 17168 tomcat 22u sock 0,5 1311215 can't identify protocol
            java 17168 tomcat 29u sock 0,5 1311225 can't identify protocol
            java 17168 tomcat 30u sock 0,5 1311228 can't identify protocol
            java 17168 tomcat 31u sock 0,5 1311231 can't identify protocol
            java 17168 tomcat 32u sock 0,5 1311234 can't identify protocol
            java 17168 tomcat 33u sock 0,5 1311239 can't identify protocol
            java 17168 tomcat 34u sock 0,5 1709638 can't identify protocol
            java 17168 tomcat 35u sock 0,5 1311422 can't identify protocol
            java 17168 tomcat 36u sock 0,5 1311425 can't identify protocol
            java 17168 tomcat 37u sock 0,5 1311428 can't identify protocol
            java 17168 tomcat 38u sock 0,5 1311431 can't identify protocol
            java 17168 tomcat 39u sock 0,5 1311434 can't identify protocol
            java 17168 tomcat 40u sock 0,5 1311437 can't identify protocol
            java 17168 tomcat 41u sock 0,5 1311440 can't identify protocol
            java 17168 tomcat 42u sock 0,5 1492150 can't identify protocol
            java 17168 tomcat 43u sock 0,5 1492155 can't identify protocol
            java 17168 tomcat 44u sock 0,5 1493022 can't identify protocol
            java 17168 tomcat 45u sock 0,5 1493025 can't identify protocol
            java 17168 tomcat 47u sock 0,5 1709754 can't identify protocol
            java 17168 tomcat 49u sock 0,5 1709755 can't identify protocol
            java 17168 tomcat 50u sock 0,5 1709756 can't identify protocol
            java 17168 tomcat 51u sock 0,5 1709772 can't identify protocol
            java 17168 tomcat 52u sock 0,5 1709773 can't identify protocol
            java 17168 tomcat 53u sock 0,5 1709854 can't identify protocol
            java 17168 tomcat 54u sock 0,5 1709856 can't identify protocol
            java 17168 tomcat 55u sock 0,5 1709857 can't identify protocol
            java 17168 tomcat 56u sock 0,5 1709858 can't identify protocol
            java 17168 tomcat 57u sock 0,5 1709859 can't identify protocol
            java 17168 tomcat 58u sock 0,5 1709860 can't identify protocol
            java 17168 tomcat 59u sock 0,5 1709878 can't identify protocol
            java 17168 tomcat 60u sock 0,5 1709881 can't identify prot
            • 3. Re: Tomcat/LCDS/Flex/RTMP File Descriptor Leak
              Hi All,
              I Am new to Flex, and i wanna know what do we mean by LCDS
              and what means configuring LCDS files...
              please let me know soon as its urgent for me .. as i am going to face an interview.. and they may ask me this...
              you can drop me your comments on this on nikhilpshah@gmail.com

              thank you

              Nikhil