I'm having problems with an application that I wrote, I guess about a year ago. It was been working fine and has really come in handy from time to time. Now I'm having difficulties with it. First a little background is in order.

It is a web form that posts the information to its self. It then passes several parameters to a few perl modules that I wrote. These perl modules I wrote are for dynamically generating reports from NetFlow data (TCP/IP header statistics exported from Cisco or Juniper routers). My modules interact with open source software called FlowTools.

What happens after all the data is collected and checked from the web form it then creates a filter file; this is required by FlowTools, using the first perl module. Then it creates a report format file also required by FlowTools, using the second perl module. Then I execute a FlowTools command with system() function. This is were my problem comes in. This execution take a along time, in some cases it must process over one gig of data at a time. While this execution is going on the web browser is sitting a wait for something to be returned. The web browser times out and does not finish.

What is supposed to happen next is the application is to create an HTML file and email to the recipient. Then clean up all the other files that it created in order to generate the HTML file.

So my question is how can I restructure my application so that the web browser doesn’t time out kill the child processes? Once the submit button is pressed on the web page nothing more needs to be done, the forms job is over.

I really do appreciate your advice; this one has been stumping me for a while.


In reply to Program Structure by rsharpe

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.