dbdiaz has asked for the wisdom of the Perl Monks concerning the following question:

Hello Monks, I have a web application that heavily uses a database. The output is a flat-file with calculated observations.

Based on the size/request of the input file, the application can take upto an hour to do all the calculations. This works fine if the application is used within an internal domain (locally). However, the webserver times out everytime I try to run the application remotely (increasing the "time-out" in Apache didnt solve the issue).

What can be a reasonable solution to this problem? Is it possible that a user will make a request on the web to run his/her input file and the request will then be processed in the background and once completed, will prompt the user (via email?) of its completion?

Any ideas?

Thanks.

Replies are listed 'Best First'.
Re: Server time-out
by rhesa (Vicar) on Nov 29, 2006 at 04:24 UTC
Re: Server time-out
by SheridanCat (Pilgrim) on Nov 29, 2006 at 03:46 UTC
    The problem with running it in real time is that, I would assume, the process will die if the user closes the browser window during the period it's running also.

    I have done what you suggest. The user interacts with the app to notify the process to start at some point and is then notified when the process is done via email with a link on were to pickup their results.

    You could have the process running in a look or via cron looking for requests from users that it run along with whatever config information it needs to run for that user.