We have a webpage for analysing WebLogic log files which writes the progress to the browser. This interactive processing can sometimes take several hours depending on the number and size of the log files and necessitates the PC remaining switched on.
I have now modified our webpages so now there is an option to process the log files as a background task.
Here is the code:
#!/usr/bin/perl -w use CGI qw/:standard/; my $q=new CGI; use strict; umask 000; # This will set the permission of new files to the default +for the user running this script. $|=1; # Autoflush after every print statement. print $q->header(); # i.e. this is the same as: print "Content-type: t +ext/html\n\n"; my $default_dir = "/www/develop/jms/bridge_errors"; my $default_files_dir = "/www/develop/jms/bridge_errors/files"; my $identifier = $q->param("identifier"); #print "\$identifier = $identifier\n"; #exit; print <<HTMLcode; <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http:/ +/www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>Background Processing</title> <link rel="stylesheet" href="/jms/css/jumble.css"> </head> <body> <h1>JMS Bridge Error Summariser Background Task</h1> <div class=panel> <p>Background processing of the '$identifier' log files has started .. +.</p> </div> <br> <hr> <br> <address> <a href="mailto:aaa.bbb\@xxx.yyy">Contact</a> </address> </body> </html> HTMLcode # Launch the WLS Log Analyser script as a background task. exec "nohup ./error_summariser.cgi $identifier > $default_files_dir/$i +dentifier/processing-log.txt &" or die "Can't exec: $!\n";
My question is how to stop this webpage taking ages in Firefox showing the message "Transferring data from <server name>" at the bottom left corner of the browser and progress being shown in the bottom right. The webpage can take up to 5 minutes to display 'Done'!
BTW, we are running Apache 2.2.16 on OEL5.3.
Is there any way I can get this webpage to complete more quickly?
Thanks
Paul McIlfatrick
In reply to exec command taking ages by pmcilfatrick
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |