I hope someone might have some sage words about the right approach here. I have a database application that works OK locally but is reporting an error on my host provider. The error comes up when I try to bring back a fairly large dataset (22500 rows, 20 columns). In the production log I see this error:
"ActionView::TemplateError (failed to allocate memory) on line #52"
From some initial googling it looks like I am running out of resource on my server. Is there a setting that would allocate more resource? I am running on a Dreamhost server using mod_rails (or should it be Passenger?).
Actually, I suppose what I should be doing is rewriting my query so that MySQL does the heavy lifting and my application just gets back a smaller resultset. Given that, is there a recommended approach to writing my app so that it is only having to handle small tranches of data at any time?
Any guidance much appreciated.