If you set the max size to 0, it will expand as required rather than failing.