My gut says that this sounds like a race condition, but you seem to be taking reasonable precautions, such as checking the table exists before dropping it and so forth. I spotted one problem in a quick look over the linked code, which may or may not be connected to this:
Using ${Database}.(conv|pt|a)_${RemoteAddr} for your temp table names will generate collisions if you have multiple users accessing the app through the same proxy or NATting firewall, since their requests will be coming from the same address. You can avoid this by generating a random cookie and appending it to the address in your table names. (If you already have a session ID independent of the remote address, it would be perfect for this.)
Back to your original question, how does this fail when it fails? Does it return an error, hang, or what?
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.