Wow, thanks for going to all that trouble! My DoPost and DoGet routines get pretty involved, so I omitted them, preferring not to scare off any help that might otherwise be forthcoming -- and to avoid the inevitable grief for not using the CGI module. :-)

The only possibly relevent factor is that the POST routine is able to change some shared variables -- notably %Admin and %User. The GET routines have non-writing access to these variables as well. By all indications, the sharing works flawlessly. I'm even able to switch ports midstream without a glitch.

To test the code, I created a self-refreshing HTML page and loaded it into two separate windows in my browser (Opera), just to keep the server busy. I then manually caused some POSTs to be sent, using a page with <form>s. The crashes usually occurred a couple GETs after a POST, but always in near proximity to about the fifth or sixth POST. Oddly enough, even after crashing, when Windows reports that it has to terminate perl.exe, the server keeps servicing requests! This keeps up until the next POST, whereupon the house of cards finally collapses.

Opera will continue to reuse an open connection -- even sharing it among different windows -- until it's required to issue a POST. Then it will close one of its connections and open a new one to send the POST, and continue to share that connection with other windows. So my feeling is that the POST itself is a red herring and that it has more to do with connections closing and/or threads exiting.

But the mystery remains as to why the connection stays active (->connected) once Opera abandons it.


In reply to Re^2: Closing Connections using HTTP::Daemon by Dr. Mu
in thread Closing Connections using HTTP::Daemon by Dr. Mu

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.