413 errors: Request entity is larger than limits defined by server error using REST.
book
Article ID: 95411
calendar_today
Updated On:
Products
CA Infrastructure ManagementCA Performance Management - Usage and AdministrationDX NetOps
Issue/Introduction
We are looking to delete multiple devices from CAPM. We are using the REST API but we are getting 413 errors: Request entity is larger than limits defined by server. We are looking for either a way to configure the server to allow the reset command: http://:8581/rest/devices to complete.
Environment
Release: Component: IMADMN
Resolution
The limit can be increased by using the following procedure.
1. Create a file named com.ca.im.item.ws.impl.AutomaticWebServiceManagerImpl.cfg in the DA's INSTALL_ROOT/apache-karaf-XXX/etc/ directory. 2. Add the following line to that file: maxReturnItemCount=500001
3. The exact number that you put in should mimic the approximate count seen in the DA karaf.log, with the caveat that setting this to a high number can result in OutOfMemory errors.
Additional Information
Note: a restart is not needed after applying this KB