in reply to Socket hang. (Windows or Perl? Solutions?) (Updated)

After 30 secs, the server stops incrementing. Waited 5 minutes for it to continue to no avail:

perl temp.pl -port=12347 server:3853 client:3853 cycles: 112.596/secc

Strawberry perl (v5.12.2) built for MSWin32-x86-multi-thread

Replies are listed 'Best First'.
Re^2: Socket hang. (Windows or Perl? Solutions?)
by BrowserUk (Patriarch) on Apr 05, 2011 at 22:24 UTC

    If you ^C it when it stops and try to re-run the script on the same port immediately, does it block/lock/hang much more quickly?

    If you then immediately run it using a different port number, does it then demonstrate the original behaviour again?

    Thanks.


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.

      Same port worked for just 3 servers before rehanging. New port worked like a fresh instance.

      >perl temp.pl -port=12345 server:3911 client:3911 cycles: 88.886/secTerminating on signal SIGINT +(2) >perl temp.pl -port=12345 server:3 client:3 cycles: 0.250/secTerminating on signal SIGINT(2) >perl temp.pl -port=12346 server:3912 client:3912 cycles: 97.800/secTerminating on signal SIGINT +(2)
        Same port worked for just 3 servers before rehanging. New port worked like a fresh instance.

        Yes. That mirrors the behaviour I'm seeing. If you retry the original port some time later--I haven't tied down how much later yet--it "recovers", which suggests this is a timeout issue, but I am at a loss to see where else to apply timeouts?

        I;ve no reports of the same behaviour under *nix (yet), so this may be a windows-only problem. I guess I'll have to write the equivalent code in C to isolate whether it is windows itself, or Perl on windows. Which is a pain in the butt.


        Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
        "Science is about questioning the status quo. Questioning authority".
        In the absence of evidence, opinion is indistinguishable from prejudice.