Lei Wu, Web Developer

Keeping simple things simple.

Heroku Cuts Off Page Due to Content-Length Limit

Deployed a Sinatra application to Heroku and noticed one page (more than 980K) got cut off.

Tried using Puma instead of Thin, but it still didn’t work (although the page got cut off at a different place).

The solution is to compress the content.

use Rack::Deflater

Not sure about the exact cause, but maybe it’s somehow related to Heroku’s limit on Response Buffer (https://devcenter.heroku.com/articles/http-routing#request-buffering)