title: Rails, "<h2>Incomplete response received from application</h2>" in Post Json request when body is very big
body: <p>I am getting this error: </p>
  
  <pre><code>&lt;h2&gt;Incomplete response received from application&lt;/h2&gt;
  </code></pre>
  
  <p>When I am making a POST request to my app when the body is very big <code>&gt;1245</code> characters</p>
  
  <p>For example if I do this request</p>
  
  <pre><code>curl -X POST \
  -d '{"xxxxxxxxxxxxxxxxxxxxxxxx":{"xxxxxxxxxxxx":xxxx,"xxxxxxxxxxxx":["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx","xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"]},"xxxxxxxxxxxxxxxxxx":["xxxxx xxx","xxxxx xxxxxxxxxxxxxxx","xxxxx xxxxxxxxxx","xxxxx xxxxxxxxxxxxxxxx","xxxxx xxxxxxxxxxxxxxxxxxxxxx","xxxxx xxxxxxxxx","xxxxx xxxxxxxxxxxxx","xxxxx xxxxxxxxxxxx","xxxxx xxxxxxxxxxx","xxxxx xxxxxxxxxxxxxxx","xxxxx xxxxxxxxxxxxxx","xxxxx xxxxxxxx","xxxxx xxxxxxxxxxxxxxx","xxxxx xxxxxxxxx","xxxxx xxxxxxxxxxxxx","xxxxx xxxxxx","xxxxx xxxxxxxxxxxxxxxxxxxxxxxxxx","xxxxx xxxxxxxxxxxxxxxxxxxxxxxxx","xxxxx xxxxxxxxxxxxxxxxxxx","xxxxx xxxxxxxxxxxxxxxxx","xxxxx xx","xxxxx xxxxxxxxx","xxxxx xxxxxxxx","xxxxx xxxxxxxxx","xxxxx xxxxxxxxxxxxxxx","xxxxx xxxxxxxxxxx","xxxxx xxxxxxxxxxxxxxxxx","xxxxx xxxxxxxxxxx","xxxxx xxxxxxxxxx","xxxxx xxxxxxxxxxxx","xxxxxx xxxxxxxxx xx","xxxxxx xxxxxxx xx","xxxxxx xxxxxxxx","xxxxxx xx","xxxxxx xx xxxx","xxxxxx xxxxxxxxx xx","xxxxxx xxxxxxxxx xx xxxx","xxxxxx xxxxxxxxx xx","xxxxxx xxxxx","xxxxxx xxxxxx xx","xxxxxx xxxx","xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","xx"]}' \
  http://miapplication/action.csv
  </code></pre>
  
  <p>It works well.. but if I add one character more to the body:</p>
  
  <pre><code>curl -X POST \
  -d '{"xxxxxxxxxxxxxxxxxxxxxxxx":{"xxxxxxxxxxxx":xxxx,"xxxxxxxxxxxx":["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx","xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"]},"xxxxxxxxxxxxxxxxxx":["xxxxx xxx","xxxxx xxxxxxxxxxxxxxx","xxxxx xxxxxxxxxx","xxxxx xxxxxxxxxxxxxxxx","xxxxx xxxxxxxxxxxxxxxxxxxxxx","xxxxx xxxxxxxxx","xxxxx xxxxxxxxxxxxx","xxxxx xxxxxxxxxxxx","xxxxx xxxxxxxxxxx","xxxxx xxxxxxxxxxxxxxx","xxxxx xxxxxxxxxxxxxx","xxxxx xxxxxxxx","xxxxx xxxxxxxxxxxxxxx","xxxxx xxxxxxxxx","xxxxx xxxxxxxxxxxxx","xxxxx xxxxxx","xxxxx xxxxxxxxxxxxxxxxxxxxxxxxxx","xxxxx xxxxxxxxxxxxxxxxxxxxxxxxx","xxxxx xxxxxxxxxxxxxxxxxxx","xxxxx xxxxxxxxxxxxxxxxx","xxxxx xx","xxxxx xxxxxxxxx","xxxxx xxxxxxxx","xxxxx xxxxxxxxx","xxxxx xxxxxxxxxxxxxxx","xxxxx xxxxxxxxxxx","xxxxx xxxxxxxxxxxxxxxxx","xxxxx xxxxxxxxxxx","xxxxx xxxxxxxxxx","xxxxx xxxxxxxxxxxx","xxxxxx xxxxxxxxx xx","xxxxxx xxxxxxx xx","xxxxxx xxxxxxxx","xxxxxx xx","xxxxxx xx xxxx","xxxxxx xxxxxxxxx xx","xxxxxx xxxxxxxxx xx xxxx","xxxxxx xxxxxxxxx xx","xxxxxx xxxxx","xxxxxx xxxxxx xx","xxxxxx xxxx","xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","xxx"]}' \
  http://miapplication/action.csv
  </code></pre>
  
  <p>It fails with the above error.</p>
  
  <p>I have seen several threads in SO regarding to this error but all of them are related to the setting of the <code>secrets.yml</code> file. And I have this file properly set in my App. Also in my case the error was happening only when they body size is crossing specific size.</p>