title: Heroku Rails Log Error Message on text field: ERROR invalid body size
body: <p>I'm running a rails 4.0.2 app hosted on Heroku using the hobby tier of Heroku Postgres :: Onyx. I got an odd error in my log file and a record failed to save.  I can't recreate the error.</p>
  
  <pre><code>2014-05-23T05:28:33.443728+00:00 app[web.1]: [2014-05-23 05:28:33] ERROR invalid body size.
  </code></pre>
  
  <p>The reason that this error is odd is that the only body field anywhere in my app is a text field.</p>
  
  <p>Here is the relevant schema:</p>
  
  <pre><code>create_table "invitation_templates", force: true do |t|
  
    t.integer  "business_id"
    t.string   "subject"
    t.text     "body"
    t.datetime "created_at"
    t.datetime "updated_at"
  end
  </code></pre>
  
  <p>Here is my model (which contains no validations by the way):</p>
  
  <pre><code>class InvitationTemplate &lt; ActiveRecord::Base
  
    belongs_to :business
  
  end
  </code></pre>
  
  <p>Here is the complete controller:</p>
  
  <p>def create</p>
  
  <pre><code># @user set by correct_user
  
  # @business set by correct_user   
  
  @invite = Invite.new(invite_params)
  
  if @invite.valid?
    invtemp = InvitationTemplate.find_or_create_by(business_id: @business.id)
    invtemp.subject = @invite.subject
    invtemp.body = @invite.message
    invtemp.save    # &lt;--- This is the only line that I can think of as having thrown the error
  
    if invite_params[:image_file].present?
      uploaded_io = invite_params[:image_file]
      @invite.image_id = Image.add_or_update( @invite.image_id, uploaded_io, "invites" )
    end # if params[:image_file].present?
  
    inviter = ManInvite.new
    res = inviter.sendInvitation(@invite, @business)
  
    if res
      flash[:notice] = "We sent your message(s).  You will recieve an email when a new testimonial has been submitted."
    else
      flash[:error] = "We saved your message(s).  But had a problem sending.  Please contact support with this information: #{@invite.status} #{@invite.audit_id}"
    end
  
    if params[:send_another]
      redirect_to( new_business_invite_path(@business) )
    else
      redirect_to(  business_dashboard_index_path(current_user.businesses.first()) )
    end
  
  else
    render 'new'
  end
  </code></pre>
  
  <p>end</p>
  
  <p>I didn't think that text fields could throw a size error.  Any thoughts on the cause/source of this error would be appreciated.</p>