This article was created in response to a support issue logged with K2. The content may include typographical errors and may be revised at any time without notice This article is not considered official documentation for K2 software and is provided “as is” with no warranties.
Unable to edit a form, the spinner appears until the request times out. New forms and most of the existing forms are editable.
The SQL server process eats up all the CPU resources. Finally after a while, a server error appears: "Request timed out".
Usually this issue is related to the size of the form being edited and can be resolved by increasing maxRequestLength or by adding maxAllowedContentLength. But in this case the root cause was different.
Execute the following query against the K2 DB:
DECLARE @User NVARCHAR(448)
SET @User = N'K2:Domain\UserName'
SELECT [FQN] ,[Type] FROM [Identity].[GetIdentityAndContainers]([Identity].[GetIdentityIdFromName](@User, NULL, 1)) AS ic
WHERE [Enabled] = 1 -- Ignore disabled users or groups
[Type] <> 2 --Roles not supported
The query timed out, so we went through the Identity.Identity and Identity.Identitymember and noticed there are circular references
in AD groups for example K2Dev group is a member of itself.
After cleaning up the offending groups and refreshing the identity cache using the ForceIdentityRefresh tool, it resolved the issue.
K2 will implement a mechanism to handle circular references in a future update.