Use launghConfig.getMaxContentLength() to limit http client max limits.