Hi. I'm using Sungo's Cookbook TCP server (Using SocketFactory and ReadWrite). The devices that connect to this server are gprs enabled terminals(iButton devices). Sometimes the terminals are having a delay of couple hours when sending a data. When I wiresharked the session, experts said, that devices are refused connection repeatedly, until the device goes to sleep. My problem is, that these kind of problems appear randomly, not on all devices at the same time(some devices are always connected and send data without delay) and not constantly.
Debian 6, 64-bit, perl 5.14.2 with perlbrew and cpanm POE. Constantly connected devices 50-75 (generally less than 100) 1) Is this even trackable with POE? I'm bit lost, where to even begin debugging 2) How can I stress test the daemon and determine that no connections are refused? Open IO::Socket::INET socket x 1000 without closing? Any advice or hints are welcome, as I'm on my wits end. Excerpt from the expert's mail: Occasionally, it seems that the server (listening on port 8888) closes an active connection with the device. The device will then try to re-establish a connection, which frequently gets rejected by the server on the first attempt. Largest question is regarding data from packet 25659 (with the same filter). Here the server closes the connection and the device attempts re-connection repeatedly (for about 20 minutes) until it goes into its idle mode (where it would wait for data entry before attempting another re-connection). Why would the server be closing (and then refusing) a connection like this? Wireshark filters for curious (sorry, I doubt you need a wireshark log and it is big): To show rejected connection requests: tcp.flags.reset == 1 To show connection attempts: tcp.flags.syn == 1 Thanks, Antti