Workaround: Queries can fail with QueryExpiredException

Workaround Summary

When you use certain releases of the V3.0 IBM Rational Team Concert Eclipse client to access a V4.0 Jazz Team Server that is running in clustered mode, queries might fail with the following error: “com.ibm.team.repository.common.QueryExpiredException: Query _itemId expired”.

More Information

Problem

The problem occurs when all of the following conditions are in effect:

  • When you use a V3.0 release of Rational Team Concert Eclipse client that is earlier than V3.0.1.4 to access a V4.0 Jazz Team Server that is running in a clustered environment.
  • When session affinity is disabled in the web server.
  • When you run a query with full text conditions, including actions that result in full text queries, such as a “Find Potential Duplicates” search or a full text search that is started from the search field.
  • When a query returns more than 20 items.

The QueryExpiredException occurs because the query has an affinity with the session that is not available when the request is routed to a server that runs on a different node in the cluster.

The problem is caused by the way queries are “paged.” When a query is run, results are fetched in pages. Tokens that access the result pages are managed on each cluster node individually. In clustered environments in which session affinity is disabled, requests for subsequent pages can go to a different node where a page token is unknown because the query is not cached yet on that node. As a result, the query fails with a QueryExpiredException.

A fix for this problem shipped with Rational Team Concert V4.0 release and the V3.0.1.4 maintenance release.

Workaround

You can work around this issue by taking one of these actions:

  • Upgrade to the Eclipse client to V4.0 or V3.0.1.4.
  • Use the web client to run the query.
  • Try to modify the query so that it returns fewer than 20 items.
  • Enable session affinity in the web server that runs Jazz Team Server. In IBM WebSphere Application Server, you can enable session affinity on the web server administration pages:
    1. Click Servers > Server Types > Web Servers.
    2. Add a custom property called IgnoreAffinityRequests, set the property to true, and save to the master configuration.
    3. Optional: To improve performance, click Plug-In Properties > Request Routing, and set the Load Balancing option to Random.
    4. Save directly to the master configuration.

Attention: Each client that communicates with the web server or cluster can use one or more sessions. If session affinity is enabled, load balancing is not optimized in the cluster because every request in the context of a session is routed to the same node rather than being balanced among available nodes. If you enable session affinity, you might reduce system performance and throughput.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.
Feedback
Was this information helpful? Yes No 0 people rated this as helpful.