title: ActionDispatch::Cookies::CookieOverflow but the cookie is small
body: <p>I recently started receiving a <code>ActionDispatch::Cookies::CookieOverflow</code> from a simple form upload. Looking at the POST request, the Content-Length is 25000+, but the cookie is only 520 characters and contains only the session cookie. ActionDispatch::Cookies::MAX_COOKIE_SIZE is 4096.</p>
  <p>This is the form in question. It's an ActiveAdmin sidebar.</p>
  <pre><code>&lt;link rel=&quot;stylesheet&quot; href=&quot;http://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css&quot;&gt;
  &lt;%= form_tag &quot;/import/from_csv&quot;, method: :post, multipart: true do %&gt;
    Upload a CSV file.
    &lt;%= label_tag(:file, 'CSV file:') %&gt;
    &lt;%= file_field_tag(:file) %&gt;
  
    &lt;%= label_tag(:reason, &quot;Default Reason:&quot;) %&gt;
    &lt;%= select_tag(:reason,
          options_for_select(Rails.configuration.x.reasons, &quot;unknown&quot;)
        )
    %&gt;
  
    &lt;%= label_tag(:source, &quot;Default Source:&quot;) %&gt;
    &lt;%= text_field_tag(:source, 'csv') %&gt;
  
    &lt;%= submit_tag(&quot;Import&quot;,  id: &quot;import&quot;) %&gt;
  &lt;% end %&gt;
  </code></pre>
  <p>We're using the default session store with the JSON cookies serializer. We're not doing anything special with cookies. I tried clearing the cookie, same problem.</p>
  <p>What could be causing this?</p>
  <ul>
  <li>Rails 6.1.3.2</li>
  <li>ActiveAdmin 2.9.0</li>
  <li>Ruby 2.7.2</li>
  <li>Devise 4.7.3</li>
  </ul>