If you run a long-running process inside of your webserver process the process will not be available to handle new web requests anymore. you probably want a job-queue of some sort.
http://stackoverflow.com/questions/25277158/run-asynchronous-methods-in-catalyst-perl http://blogs.perl.org/users/davewood/2014/07/asynchronuous-task-distribution-with-anyevent-and-zeromq.html cheers david On 6 October 2014 15:53, Antonio Soro <[email protected]> wrote: > Hello, > I plan to run server code in asynchronous mode after a response back to the > client made from an action code in a Catalyst controller. > > I'm using Catalyst::Plugin::RunAfterRequest plugin in a Catalyst 5.80 > environment started in 'FastCGI' mode, called by Apache2 httpd server, with > FastCgiExternalServer directive of mod_fastcgi.c module (v2.4.6), in a Linux > UBUNTU box with Perl 5.12.4. > > It seems, in that environment, response for client request occurs after long > time processing, differently that I run Catalyst Runtime in 'Server' mode > where response back to the client occurs immediately and long time processing > occurs delayed. > > Can somebody tell me this behavior is correct or there is something wrong? > Are there better methods to call long-time-running code across > Apache/FastCGI/Catalyst ? > > Thanks for feedback. > Antonio Soro. > > ----------------------------------------------------------------------- > Questa comunicazione e ogni eventuale file allegato sono confidenziali > e destinati all'uso esclusivo del destinatario. Se avete ricevuto > questo messaggio per errore Vi preghiamo di comunicarlo al mittente e > distruggere quanto ricevuto. > > > _______________________________________________ > List: [email protected] > Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst > Searchable archive: http://www.mail-archive.com/[email protected]/ > Dev site: http://dev.catalyst.perl.org/ _______________________________________________ List: [email protected] Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[email protected]/ Dev site: http://dev.catalyst.perl.org/
