Skip to main content

We had an issue recently where saving a page in the admin area produced one of the following outcomes:

  • The page would reload and not save the selections that were made; or
  • Save the page and the input box area would be a white screen and the front end of the site would not be show any more.

The page we are referring to holds a matrix of 18,079 input box items.  What how did it get that big?  The page layout is show well organised and visually easy to view that we hadn't assessed the total size of input boxes nor of their impotance.  So not a small page.  This was made up of 179 camps against 101 active products.  Reading through the error logs on the server, the error was related to max_input_vars.  This holds a default value of 1,000.  max_input_vars means maximum input variables.  max_input_vars mitigates the possibility of denial of service attacks or DoS attacks.  Something to protect the site against.  So keeping it low is important.   

As a short term remedy the max_input_vars was adjusted to 20,000.  The page would save correctly and no impact to the front-end of the site.  Moving forward we need to do a couple of changes:

  1. Redesign the page so a maximum of input boxes displayed is limited to either the maximum number of products or camps.  
  2. Once completed reduce the max_input_vars back to a low value and therefore lowering the risk of an DoS attack.