Skip to main content

Hi all

I have written a custom task list for a web page using the K2ROM to retrieve all of a users or groups tasks. This could be a very large task list (maybe a couple of hundred tasks) and it was all working fine until we upgraded from Sp2a to Sp4a. Now it keeps timing out on the connection.OpenWorklist call.

Any ideas as to why this might be? I know that when there are lots of users online it makes it worse, but it never used to be so much of an issue.

 

Thanks

Are you using the worklistcriteria object in the OpenWorklist call?


 There was a change moving from SP2a to SP4 where the filtering was moved to the SQL server backend.  Previously the filtering was done on the K2 server side.


 A couple of options that are common:



  1. If you don't need to return process data from the OpenWorklist call, try setting the NoData property on the WorklistCriteria object to true.
  2. Bypass the worklistcriteria object if possible.

 


Hi Jonny

Thanks for getting back to me.

Unfortunately we need process data so we can't use the NoData call, and I do need to use the worklistcriteria as I need to filter out what processes are being returned.

 Any other ideas?


Hmm, if you are locked in to use the worklistcriteria object and you also require data fields.  You could probably try:



  1. Run the openworklist call without the worklistcriteria object but do the filtering in code on the web server.
  2. Tune the process to make sure that any fields that are not needed on the client pages are marked to be loaded on demand (in the data fields properties).
  3. Tuning your SQL server physical setup.  e.g. using filegroups, separating the DB data and transaction log files into separate LUNs on your SAN, etc.  Check with your SQL DBA for tips.
  4. Run a SQL profile trace to capture your worklist query SQL statement and run it through the tuning wizard to see if it can improved by using indexes.

Other than that, you could probably stick with SP2a if that works fine unless you need any of the new features in SP3/4.  However, you would need to rollback your upgrade and this might not be possible in a live environment.


Great ideas, thanks very much.

I'll give it a try


Is there a way to extend the timeout threshold on K2 connection object or on SQL server side?

Smully, how many filtering criteria are you using?

 


The only timeout I can think of extending is on IIS for the connection timeout.

For the criteria I am using 3, one to get the right process folder, one to narrow it down to the correct set of procceses inside the folder and a sort field.

You think that makes a difference?


I don't recall any timeout settings at the K2 server layer.  Timeout settings are normally in the web layer and SQL server layer.  You can probably tweak the defaults from those areas.
icon-quote.gifjohnny:

Hmm, if you are locked in to use the worklistcriteria object and you also require data fields.  You could probably try:



  1. Run the openworklist call without the worklistcriteria object but do the filtering in code on the web server.
  2. Tune the process to make sure that any fields that are not needed on the client pages are marked to be loaded on demand (in the data fields properties).
  3. Tuning your SQL server physical setup.  e.g. using filegroups, separating the DB data and transaction log files into separate LUNs on your SAN, etc.  Check with your SQL DBA for tips.
  4. Run a SQL profile trace to capture your worklist query SQL statement and run it through the tuning wizard to see if it can improved by using indexes.


 


Great idea, tried this on our dev system (haven't gone live with it yet) and it's working so much faster. Turns out the _FieldOnDemand table has an unindexed ID column... setting an index on this really speeds things up. Found it using SQL tracing, then we just let SQL fine tune the table and happiness ensues.


 Thanks very much


Cool Stuff.  Glad to hear that this works for you.

Reply