-
Type:
Bug
-
Status: Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 6.0.0
-
Fix Version/s: 6.5.0
-
Component/s: console, performance, rest
-
Environment:AM 6.0.0-SNAPSHOT Build c756aa8ed6 (2018-April-24 13:10) @ Tomcat 8.0.46 @ CentOS 7.3
-
Target Version/s:
-
Needs QA verification:Yes
-
Are the reproduction steps defined?:Yes and I used the same an in the description
Bug description
API for retrieving list of policies can timeout, when large count of policies is created. For 10k it is OK, but for 100k it fails with 504 - Gateway timeout. Loading of policies can fail also in WebUI due to this bug.
Reason might be that the response is not paginated by default.
How to reproduce the issue
- Default AM configuration
- Create 100k policies in top level realm
- Send request for listing properties like
curl --request GET \ --url 'http://brie.internal.forgerock.com:8081/openam/json/policies?_queryFilter=true' \ --header 'accept: text/html' \ --header 'accept-api-version: resource=2.0' \ --header 'content-type: application/json' \ --cookie 'amlbcookie=01; iPlanetDirectoryPro=szvyE...xAAA.*'
Expected behaviour
{ "result": [ { "_id": "policy1955", "_rev": "1459410117234", "name": "policy1955", "active": true, "description": "", "applicationName": "iPlanetAMWebAgentService", "actionValues": { "POST": true, "GET": true }, "resources": [ "http://*:*/Resource1955.html" ], "subject": { "type": "Identity", "subjectValues": [ "id=user.1955,ou=user,dc=openam,dc=forgerock,dc=org" ] }, "resourceTypeUuid": "76656a38-5f8e-401b-83aa-4ccb74ce88d2", "lastModifiedBy": "id=amAdmin,ou=user,dc=com", "lastModifiedDate": "2016-03-31T07:41:57.234Z", "createdBy": "id=amAdmin,ou=user,dc=com", "creationDate": "2016-03-31T07:41:57.234Z" }, { "_id": "policy1956", "_rev": "1459410117234", "name": "policy1956", "active": true, "description": "", "applicationName": "iPlanetAMWebAgentService", "actionValues": { "POST": true, "GET": true }, "resources": [ "http://*:*/Resource1956.html" ], "subject": { "type": "Identity", "subjectValues": [ "id=user.1956,ou=user,dc=openam,dc=forgerock,dc=org" ] }, "resourceTypeUuid": "76656a38-5f8e-401b-83aa-4ccb74ce88d2", "lastModifiedBy": "id=amAdmin,ou=user,dc=com", "lastModifiedDate": "2016-03-31T07:41:57.234Z", "createdBy": "id=amAdmin,ou=user,dc=com", "creationDate": "2016-03-31T07:41:57.234Z" }, ... ], "resultCount": 1000, "pagedResultsCookie": null, "totalPagedResultsPolicy": "NONE", "totalPagedResults": -1, "remainingPagedResults": 100 }
Current behaviour
504 - Gateway timeout
Work around
Use _pageSize parameter with some reasonable value.
- is related to
-
OPENAM-12156 Admin console shows no agents when there are many (5K+)
-
- Open
-
- relates to
-
OPENAM-16529 Amster unable to Export 4000+ policies
-
- Open
-