Re: [Catalyst] Sending 3000 emails.
On Thu, Nov 26, 2015 at 4:32 PM, Andrewwrote: > I just want to know why the whole FastCGI Plack loaded Catalyst app came > down half way through, > and how I can have a Perl script process sending 3000 emails without that > happening every time, =S. > As pointed out already the main problem here is that you are trying to do stuff (sending email) within the app thread, that is you are breaking the app design and should use a batch/background thread to do intensive work (even reading all the emails from database could be a problem, depending on how you do the query and how optimized is the database). I would pick up at least an email alias, that can be easibly auto-generated and updated each time a new user joins. This way you are at least hiding the 3000+ receivers behind a single email, letting the email software to do the stuff it has been built for. The next step would be to use a mailing list, internal or external. The only reason I could see for looping thru every email address could be to store in the database the result of the sending process, which is in my opinion worthless. Luca ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Sending 3000 emails.
I would pick up at least an email alias, that can be easibly auto-generated and updated each time a new user joins. ---> While I understand the principles you are recommending, I'm not sure exactly what is being suggested, as regards to implementation. Are we talking exim, vexim, a custom perl script, sendgrid, mailshot, mailman, I get the principle - the Catalyst app just sends to one email address - that email address sends a copy to all 3000 emails. How to setup that one email though, I'm not sure. This way you are at least hiding the 3000+ receivers behind a single email, letting the email software to do the stuff it has been built for. ---> Yes...and that's the question: What email software? ^_^ The next step would be to use a mailing list, internal or external. ---> Perhaps this is a clue - are you recommending mailing list software to do the job? The only reason I could see for looping thru every email address could be to store in the database the result of the sending process, which is in my opinion worthless. ---> Well, at the moment I'm looping through every email address to construct a "To" line, to add to the email source, which then gets sent using sendmail - as described in my last email to the group. Given I mentioned 8 minutes of unresponsiveness when it comes to webpage requests from a browser - this obviously isn't ideal, ^_^. ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Sending 3000 emails.
- Original Message - From: Len Jaffe To: The elegant MVC web framework Sent: Friday, December 04, 2015 10:14 PM Subject: Re: [Catalyst] Sending 3000 emails. On Fri, Dec 4, 2015 at 4:03 PM, Andrewwrote: Exim itself should be the queue and processor shouldn't it? exim is not the job processor and queue. It is the Mail Transfer Agent (MTA). The job processor generates my email, and hands it off to exim for delivery. ---> Yes, that happens in your case. I was hoping I could get exim to be the thing running in the background that handles the mail, and my experiments showed it was able to be the queue for me. However, my Catalyst app, while no longer crashing, does fail to serve responses to a browser, until exim has everything in its queue, and as such, it seems I do indeed need a process, separate from my web app, to be passing those emails to the queue. -- Len Jaffe - Information Technology Smoke Jumper - lenja...@jaffesystems.com 614-404-4214@LenJaffe www.lenjaffe.com Host of Code Jam Columbus - @CodeJamCMH Curator of Advent Planet - An Aggregation of Online Advent Calendars. -- ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/ ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/