Parameterize max errors for clear container

Also use setter injection for max request time.
Merge pull request #1442 from maginatics/clear-container-parameterize-max-errors

Parameterize max errors for clear container