Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

I wrote that test just to test whether or not the Exception::Class:TryCatch code would catch a deadlock error. I have not taken it further to test code more similar to my production code, because I have not yet figured out how to do that right.

This CGI process touches tables that are touched by only one other process (which does not insert data into it, but rather reads from it (in a scheduled task that stars at 1AM EST)) The scheduled task itself takes half an hour or so to complete, but that is because it executes a couple hundred SELECT SQL statements (no long running transaction as each takes less than a second to complete. Where that scheduled task spends most of its time is in calculation of derived results, and date manipulation, between SQL statements. As these random periods of data lost have never happened at the time that this scheduled task runs, it seems unlikely that it is a contributor to the problem.

I had considered using another daemon or service (but it has to be able to work on both Linux and Windows as I do much of my initial development on Suse, but testing and production happens on a Windows box), but I have not figured out how best to do that. Can I trouble you to make a recommendation of a couple of the best servers, for multithreaded XML-RPC and FastCGI servers that handle this sort of thing. I am guessing that the servers you have in mind can take simultaneous requests from a few to many (how many? Or how many can be handled by a pool of such a server?) instances of my CGI script, and put them into a kind of buffer or queue. Would that be right? I don't see how you can take data from multiple threads or processes and insert it into a database without using some sort of queue to ensure that no attempted insert happens at the same time as another insert statement. And can you point me to a good reference that explains how all this ought to work and that gives examples of implementing it using the servers you prefer?



In reply to Re^4: How do I handle a DB error when a SQL statement must not fail? by ted.byers
in thread How do I handle a DB error when a SQL statement must not fail? by ted.byers

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, 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, 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.
  • Log In?

    What's my password?
    Create A New User
    and all is quiet...

    How do I use this? | Other CB clients
    Other Users?
    Others wandering the Monastery: (3)
    As of 2018-06-18 06:13 GMT
    Find Nodes?
      Voting Booth?
      Should cpanminus be part of the standard Perl release?

      Results (108 votes). Check out past polls.