Thanks for the quick answer!

What I plan is to stop the process and flag it as "pending" in my 
backoffice, making the process manually later in my machine as an exception.

I've used 2X dynos, but all the memory available is used and R14 errors 
also are thrown. Imagemagick works this way, with much memory. I've limited 
delegating to disk cache instead of memory cache 
(http://www.imagemagick.org/script/command-line-options.php#limit, 
suggested in some places, example here: 
http://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=23090), but 
no changes.






On Thursday, June 13, 2013 10:31:13 AM UTC+2, Daniel Farina wrote:
>
> On Thu, Jun 13, 2013 at 1:27 AM, Josal <jos...@gmail.com <javascript:>> 
> wrote: 
> > Hi, 
> > 
> > I have a problem with R14 errors. 
> > 
> > I run a process in a worker dyno. It converts a list of images to a 
> single 
> > pdf with imagemagick. It's well known that this tool uses a lot of 
> memory. 
> > I'm currently making a syscall directly because it seems it works better 
> > than rmagick gem regarding the R14 errors. I can provide more details on 
> > this as I've tried many options here, limiting the memory, even talking 
> with 
> > heroku support, etc 
> > (
> http://stackoverflow.com/questions/16918845/almost-solved-heroku-worker-dyno-giving-r14-errors-problems-with-memory-mana)
>  
>
> > 
> > Eventually, the process throws R14 errors depending on the file I'm 
> > processing and also depending on the context (because it doesn't throw 
> the 
> > errors always with the same files). 
> > 
> > At the end, the files are sucessfully generated even with R14 errors. 
> But I 
> > guess it's not a very stable situation for my production app. 
>
> Yeah, one is running close to the edge.  It's good you saw the warning. 
>
> > I want to detect the R14 errors before they happen. I know oink gem but 
> the 
> > situation is that I cannot call any method while the syscall is running. 
> The 
> > R14 errors appear while the syscall is running. How can I predetect them 
> in 
> > execution time? Something like a wrapper for this syscall which monitors 
> the 
> > use of memory and throws a controlled exception if the memory usage is 
> > exceeded? Like Timeout::timeout but related to memory instead of time? 
> :-s 
>
> You can monitor memory usage in /proc, but what were you planning to 
> do, exactly?  Crash the Dyno? Because that's what would eventually end 
> up happening.  I suppose some some finesse you could try to abort very 
> specific bad jobs. 
>
> Have you considered use of 2x dynos?  They cost twice as much, but 
> ofttimes one only needs half as many, or even less on account of some 
> of the efficiency benefits of more monolithic computation.  It may 
> give your program more breathing room. 
>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Heroku" group.

To unsubscribe from this group, send email to
heroku+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/heroku?hl=en_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"Heroku Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to heroku+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to