How to increase query cache size for EWM when using rest API of ALM using python .
I have connected to ALM server using API .
Just for some project purpose I want to collect few data for that I have written down the queries and used that in the python script..
But I am getting exception with 500 status code with explanation that 'Query has expired.'
Now after digging it up I get to know that this happens when our servers query cache size is less.
So can you please tell me something that how can I increase the Query cache size using API for python.
For you to get reference from , visit here: " https://www.ibm.com/support/pages/increase-query-cache-size-prevent-query-expired-issue"
3 answers
Thanks to all of three for giving your suggestion .
I was not aware of this details last time .
I am using IBM ALM (specifically EWM ) of version 7.0.2 SR1 having ifix : "iFix017"
We have developed 1 Tool for our internal use where we estimate story created on users name .
For this we have used "OSLC service " of ALM to get the data with the help of REST API .
I am using the API is "https://'host'/ccm/oslc/queries/'Query_Id'/rtc_cm:results"
So now the issue is sometimes I am getting all the result set of this query and max time it is throwing ""500 Internal server error".
Specifically -->
"<oslc_cm:error>
<oslc_cm:status>500</oslc_cm:status>
<oslc_cm:message>Query _iryl-c7NEe2x1fNfnKYFUQ expired.</oslc_cm:message>
</oslc_cm:error>"
<oslc_cm:status>500</oslc_cm:status>
<oslc_cm:message>Query _iryl-c7NEe2x1fNfnKYFUQ expired.</oslc_cm:message>
</oslc_cm:error>"
Means the queries which are having result set less than 100 is executing fine and we are getting the result set as well but the issue come in picture when the result set is greater than 100.
For the queries greater than 100 it is giving this above shown error and then it is leading to abortion of the same query (not giving result set even though it has loaded that 1st 100 result set but when it goes for 2nd 100 with the link given there only with "oslc_cm:next" it is throwing "query expired" and entire query then will get aborted not giving any single result).
Meanwhile I got to know about the WI which was discussing on the same issue . And in that same issue these peoples had fixed that issue as well with new build.
You can see that here : https://jazz.net/jazz/web/projects/Jazz%20Foundation?_ga=2.267364936.71288068.1680150979-1478019675.1679977389#action=com.ibm.team.workitem.viewWorkItem&id=76944
which I get from https://www.ibm.com/support/pages/increase-query-cache-size-prevent-query-expired-issue
To see these link you first need to login then you can see this .
So now my question is this query expiration issue is due to our code/logic or it is due to server settings and its model ?
If it is due to our code logic then can you please suggest something so that we will get out of this issue . And if it by server end then please give some solution over this because we are so much struggling with this error..
And if possible then can you please provide us that new API created about which was discussed above in the WI I have provided link for .
And as discussed by @David Honey , same it is happening with me , but as I discussed earlier the tool has built for our internal use on the Django Framework , So i never encountered with clustered Deployment and session affinity. If possible then can you please describe about this session affinity and how to use it .If I get any documentation of it or code related to this then it will be very great @David
Thanks in advanced to all of you.
Comments
As mentioned above, this is NOT OSLC, just to set the context.
I would suggest to open a case with support so that the data can be collected and looked at.
This is EWM/RTC specific. The server has advanced properties that can be adjusted. E.g. the advanced server properties contains
com.ibm.team.repository.service.internal.QueryService that has properties that can be adjusted e.g. Query Cache Size.
I have however no idea if this is involved and I think it is not a good idea to touch these, if there is no suggestion from support to do so.
Comments
Thank you Ian . But I didn't make changes in query cache size . I am feeling to do this first and analyze the behaviour.
And thank you so much to Ralph for giving this much of information .
I initially thought it is a REST API that I am using here . But Thanks a lot for correcting me and introducing this blog to me you have return.
I will read this blog thoroughly so that I can get the right API to query the work Items to get what I want without caching and pagination.
Mainly , I am getting the result set the only issue is that it is causing pagination of the result set thats why it throwing an error.
Just I got to know how can I avoid pagination and this query caching then easily I will get entire result set .
Thank again to both of you I will go through blog but still if anyone will knows that how to avoid pagination of result set of query then it will be very good to me .
Thank again
Comments
Ian Barnard
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Mar 23 '23, 4:57 a.m.David Honey
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Mar 23 '23, 7:25 a.m.Ralph Schoon
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Mar 23 '23, 10:36 a.m.