In scenarios with poor Internet connectivity, libpagekite seems to be leaking file descriptors. Eventually this leads to exhaustion of available fds for the process that is using libpagekite.
This can be reproduced by using dummynet / ipfw to simulate poor network connectivity conditions. For example the following commands will limit network bandwidth to 1Mbit/s and introduce a packet loss rate of 16%:
ipfw pipe 1 config bw 1Mbit/s plr 0.16
ipfw add 1000 pipe 1 ip from any to any
With this configuration, and monitoring with lsof, I see a steadily increasing number of TCP connections stalled in the CLOSE_WAIT state.
In scenarios with poor Internet connectivity, libpagekite seems to be leaking file descriptors. Eventually this leads to exhaustion of available fds for the process that is using libpagekite.
This can be reproduced by using dummynet / ipfw to simulate poor network connectivity conditions. For example the following commands will limit network bandwidth to 1Mbit/s and introduce a packet loss rate of 16%:
With this configuration, and monitoring with
lsof
, I see a steadily increasing number of TCP connections stalled in theCLOSE_WAIT
state.