<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hello Dave<br>
for my point of view , the problem come from file <span class="kw1"></span><span
class="kw1"><a moz-do-not-send="true"
href="http://l.facebook.com/l.php?u=http%3A%2F%2Fpastebin.com%2FQGCFtq2X&h=rAQEet8kg&enc=AZPs41qoqJIPTpi-4sL7ICzxgTszmdLN8joWBwLuzcrfK9vRcRfNFMBkMwQ469-n_nstqwOwtAbH-nmvLQ2wpy562EF9ef2zhBcdAmH-VMVJ0hxvwzRz0I7PTKh3UXO8cLkyOO0FHwL87zQbk5K3hOlh&s=1"
target="_blank" rel="nofollow"
style="color:rgb(59,89,152);text-decoration:none">
http://pastebin.com/QGCFtq2X</a><br>
line 77 to 80<br>
<br>
while</span> <span class="br0">(</span><span class="re0">$process</span><span
class="sy0">-></span><span class="me1">poll</span><span
class="br0">(</span><span class="br0">)</span><span class="br0">)</span>
<span class="br0">{</span>
<div class="de2"> template <span class="st_h">'processing.tt'</span><span
class="sy0">;</span></div>
<div class="de1"> <span class="kw3">sleep</span>
<span class="nu0">10</span><span class="sy0">;</span></div>
<div class="de2"> <span class="br0">}</span></div>
first time it's work, but after not , every 10 sec you send <span
class="st_h">processing.tt to your browser ( first time ,<br>
browser ask 1 anwers, not more , and that all )<br>
<br>
you need to use ajax<br>
1) launch in background your process (and create PID to locate
your process, <a class="moz-txt-link-freetext" href="https://metacpan.org/pod/Unix::PID">https://metacpan.org/pod/Unix::PID</a> )<br>
<br>
2) add javascript in your brower to update result ( see example
below )<br>
<br>
3) add route <br>
<br>
ajax '/myProcesss' {<br>
<br>
If ( $PID ) {<br>
... in course<br>
} else {<br>
... process over<br>
}<br>
<br>
}<br>
<br>
<br>
<br>
</span><span class="sy0"></span>see fun example<br>
<a class="moz-txt-link-freetext" href="http://advent.perldancer.org/2011/14">http://advent.perldancer.org/2011/14</a><br>
<br>
bye<br>
Hugues<br>
<br>
<br>
<br>
<div class="moz-cite-prefix">Le 13/10/2014 15:45, Tushar Dave a
écrit :<br>
</div>
<blockquote
cite="mid:CA+8TAD=AV+-bPirEK_HtJKV6MzPSsicU+hHWES-ZWvDu30AQqg@mail.gmail.com"
type="cite">
<div dir="ltr">
<div>
<p style="margin:0px 0px
6px;color:rgb(20,24,35);font-family:Helvetica,Arial,'lucida
grande',tahoma,verdana,arial,sans-serif;font-size:14px;line-height:19.3199996948242px">Hello,</p>
<p style="margin:6px
0px;color:rgb(20,24,35);font-family:Helvetica,Arial,'lucida
grande',tahoma,verdana,arial,sans-serif;font-size:14px;line-height:19.3199996948242px">I
am working on my Dancer Project (using Perl 5.20.0, apache2,
RHEL 6 and Dancer) in which I am providing a web form to
user. When user submits the form with appropriate values, a
Q-Q plot will be generated by R code on backend. Once the
plot is available on server I am sending user an email with
the link of generated plot.</p>
<p style="margin:6px
0px;color:rgb(20,24,35);font-family:Helvetica,Arial,'lucida
grande',tahoma,verdana,arial,sans-serif;font-size:14px;line-height:19.3199996948242px">My
code works completely fine with smaller data file (e.g.
100KB – 10 MB) upload. But, if user uploads the large data
files (e.g. > 30MB), t<span class=""
style="display:inline">he upload works fine but processing
of data and generating of plot will take more time which
caused 504 Gateway Time Out Error. I can use below options
to resolve this.</span></p>
<div class=""
style="display:inline;color:rgb(20,24,35);font-family:Helvetica,Arial,'lucida
grande',tahoma,verdana,arial,sans-serif;font-size:14px;line-height:19.3199996948242px">
<p style="margin:0px 0px 6px">(1) Change Time Out time in
apache configuration file<br>
(2) Submit a job through batch queuing system such as SGE<br>
(3) Use Proc::Simple or Proc::Background to run the
process in background and keep checking whether process is
running in background or not.</p>
<p style="margin:6px 0px">I am using the 3rd option. What I
am trying to do is I am using Proc::Simple to run
Perl-R-code (i.e. listed in below list as 2) in
background. Then I am using poll() method of Proc::Simple
to check whether the process is running or not. If the
process is running, render a template that shows user that
process is still running. When process is finished, render
another template with generated Q-Q plot. Below are my
codes:</p>
<p style="margin:6px 0px">(1) Dancer code under lib/ ---- <a
moz-do-not-send="true"
href="http://l.facebook.com/l.php?u=http%3A%2F%2Fpastebin.com%2FQGCFtq2X&h=rAQEet8kg&enc=AZPs41qoqJIPTpi-4sL7ICzxgTszmdLN8joWBwLuzcrfK9vRcRfNFMBkMwQ469-n_nstqwOwtAbH-nmvLQ2wpy562EF9ef2zhBcdAmH-VMVJ0hxvwzRz0I7PTKh3UXO8cLkyOO0FHwL87zQbk5K3hOlh&s=1"
target="_blank" rel="nofollow"
style="color:rgb(59,89,152);text-decoration:none">http://pastebin.com/QGCFtq2X</a><br>
(2) Perl + R code that generate Q-Q plot ----<a
moz-do-not-send="true"
href="http://pastebin.com/U5hg45dQ" target="_blank"
rel="nofollow"
style="color:rgb(59,89,152);text-decoration:none">http://pastebin.com/U5hg45dQ</a><br>
(3) qqPlot.tt ---- <a moz-do-not-send="true"
href="http://pastebin.com/u30XArVr" target="_blank"
rel="nofollow"
style="color:rgb(59,89,152);text-decoration:none">http://pastebin.com/u30XArVr</a><br>
(4) <a moz-do-not-send="true" href="http://processing.tt">processing.tt</a>
---- <a moz-do-not-send="true"
href="http://l.facebook.com/l.php?u=http%3A%2F%2Fpastebin.com%2FRSH1kptp&h=RAQE1lHBj&enc=AZNQgweLY1hC15HguQHmiCGzFR4PmjOnNATBVnN1R6YQAB5GTbq8HVyUgPioxTRgWi5Ixb2d4HXAkvB9XC8336gnmRWA-ARYheUbQ0LrUZRyaQI_lpMVDD_D9ZL-F-79X6a4ZlLInL6O6QOknwU9RBpX&s=1"
target="_blank" rel="nofollow"
style="color:rgb(59,89,152);text-decoration:none">http://pastebin.com/RSH1kptp</a></p>
<p style="margin:6px 0px">The problem I am facing right now
that my Dancer code (i.e. listed as 1 above) execute while
loop on line 77 of (1) but the template “<a
moz-do-not-send="true" href="http://processing.tt">processing.tt</a>”
is not coming up on browser. I don’t know what am I doing
wrong?</p>
<p style="margin:6px 0px">Can someone help me to figure out
my error? Or please suggest me any other way to resolve
Gateway Time Out Error.</p>
<p style="margin:6px 0px">Thanks for any help.</p>
</div>
</div>
<div><br>
<div dir="ltr">
<div><br>
</div>
</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
dancer-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:dancer-users@dancer.pm">dancer-users@dancer.pm</a>
<a class="moz-txt-link-freetext" href="http://lists.preshweb.co.uk/mailman/listinfo/dancer-users">http://lists.preshweb.co.uk/mailman/listinfo/dancer-users</a>
</pre>
</blockquote>
<br>
</body>
</html>