Parameterize max errors for clear container

Also use setter injection for max request time.