Wkhtmltopdf in heroku: memory problems
I have a Rails 4.2.3 / Ruby 2.2.2 application running on a free dino on Heroku.
I am using wkhtmltopdf-buildpack , but Heroku logs show me error R14 (memory quota exceeded) every time I try to create a PDF. This is an example:
2015-07-31T02:06:52.005696+00:00 app[web.1]: Started GET "/orders/1.pdf" for 200.149.16.70 at 2015-07-31 02:06:52 +0000
2015-07-31T02:06:52.162915+00:00 app[web.1]: Rendered clients/_client.html.erb (85.3ms)
2015-07-31T02:06:52.015043+00:00 app[web.1]: Processing by OrdersController#show as PDF
2015-07-31T02:06:52.015049+00:00 app[web.1]: Parameters: {"id"=>"1"}
2015-07-31T02:06:52.071357+00:00 app[web.1]: ***************WICKED***************
2015-07-31T02:06:52.309300+00:00 app[web.1]: Rendered orders/_order_products.html.erb (145.6ms)
2015-07-31T02:06:52.339531+00:00 app[web.1]: Rendered orders/show.html.erb (267.2ms)
2015-07-31T02:06:52.339015+00:00 app[web.1]: Rendered orders/_order.html.erb (262.6ms)
2015-07-31T02:07:12.162183+00:00 heroku[web.1]: Process running mem=662M(129.4%)
2015-07-31T02:07:12.162183+00:00 heroku[web.1]: Error R14 (Memory quota exceeded)
2015-07-31T02:07:22.005012+00:00 heroku[router]: at=error code=H12 desc="Request timeout" method=GET path="/orders/1.pdf" host=app.herokuapp.com request_id=50f6840e-1907-4730-ab0d-1a6f415eb3db fwd="200.*.*.*" dyno=web.1 connect=3ms service=30001ms status=503 bytes=0
I tried using the whtmltopdf-heroku gem but I have the same memory issue. I'm not sure how to debug this issue, but could you please help? In this case dynos?
+3
source to share