1

In my android app, I get a "Too many open files" exception. When I do a lsof, I get a long (and growing) list of open pipes. However in my case, both pipe end points are in my app. Another strange thing: just before having the two pipes I always have an open socket connection.

07-05 05:22:30.790 W/TAG     (  481): me.app   481     u0_a69   79       ???                ???       ???        ??? socket:[3817]
07-05 05:22:30.790 W/TAG     (  481): me.app   481     u0_a69   80       ???                ???       ???        ??? pipe:[4583]
07-05 05:22:30.790 W/TAG     (  481): me.app   481     u0_a69   81       ???                ???       ???        ??? pipe:[4583]
07-05 05:22:30.790 W/TAG     (  481): me.app   481     u0_a69   82       ???                ???       ???        ??? socket:[4593]
07-05 05:22:30.790 W/TAG     (  481): me.app   481     u0_a69   83       ???                ???       ???        ??? pipe:[4594]
07-05 05:22:30.790 W/TAG     (  481): me.app   481     u0_a69   84       ???                ???       ???        ??? pipe:[4594]
07-05 05:22:30.790 W/TAG     (  481): me.app   481     u0_a69   85       ???                ???       ???        ??? socket:[4600]
07-05 05:22:30.790 W/TAG     (  481): me.app   481     u0_a69   86       ???                ???       ???        ??? pipe:[4601]
07-05 05:22:30.790 W/TAG     (  481): me.app   481     u0_a69   87       ???                ???       ???        ??? pipe:[4601]

I am pretty sure that I close all my processes and streams. I checked the app multiple times for that and I ran PMD and FindBugs. I use HttpUrlConnection for HTTPS communication and I am also pretty sure that I disconnect all the connections, so that they can be reused.

Has anybody any idea, what those pipes could be (or how I can find out)?

Regarding the sockets (and I don't know if that's related): When I run netstat I get very much sockets in CLOSE_WAIT state:

tcp6       0     24 ::ffff:10.83.12.3:39006 ::ffff:62.75.242.64:443 CLOSE_WAIT
tcp6       0     24 ::ffff:10.83.12.3:53782 ::ffff:62.75.242.64:443 CLOSE_WAIT
tcp6       0     24 ::ffff:10.83.12.3:49433 ::ffff:62.75.242.64:443 CLOSE_WAIT
tcp6       0     24 ::ffff:10.83.12.3:41807 ::ffff:62.75.242.64:443 CLOSE_WAIT
tcp6       0     24 ::ffff:10.83.12.3:34892 ::ffff:62.75.242.64:443 CLOSE_WAIT
tcp6       0     24 ::ffff:10.83.12.3:53105 ::ffff:62.75.242.64:443 CLOSE_WAIT
tcp6       0     24 ::ffff:10.83.12.3:44466 ::ffff:62.75.242.64:443 CLOSE_WAIT

As statet above I use HttpUrlConnection on the Android side. The server is an Apache server running PHP. The SSL certificate is valid and issued from PositiveSSL.

Could this be a network issue?

tshepang
  • 12,111
  • 21
  • 91
  • 136
ToBe_HH
  • 678
  • 6
  • 9

0 Answers0