We have been trying to narrow down an issue that happens in one of our Forms instances for a few weeks now. We know it happens because we will receive Termination or Suspend emails from Forms. Today I received a handful of these emails and was able to check our SQL monitoring tool and saw high wait times around the same time I received the emails. Our SQL monitoring tool threw a warning for a 'blocking process' and I was able to see the SQL query that caused the blocking.
SELECT [Extent4].[bp_instance_id] AS [bp_instance_id], [Extent4].[has_error] AS [has_error], [Extent4].[process_id] AS [process_id], [Extent4].[process_name] AS [process_name], [Extent4].[bp_id] AS [bp_id], [Extent4].[initiator_ip_address] AS [initiator_ip_address], [Extent4].[last_updated] AS [last_updated], [Extent4].[start_date] AS [start_date], [Extent4].[end_date] AS [end_date], [Extent4].[is_archived] AS [is_archived], [Extent4].[title] AS [title], [Extent4].[snapshot_user_id] AS [snapshot_user_id], [Extent4].[snapshot_username] AS [snapshot_username], [Extent4].[snapshot_displayname] AS [snapshot_displayname], [Extent4].[snapshot_sid] AS [snapshot_sid], [Extent4].[snapshot_email] AS [snapshot_email], [Extent4].[status] AS [status] FROM [dbo].[cf_bp_main_instances] AS [Extent1] LEFT OUTER JOIN (SELECT [main_instance_data].[bp_instance_id] AS [bp_instance_id], [main_instance_data].[has_error] AS [has_error], [main_instance_data].[process_id] AS [process_id], [main_instance_data].[process_name] AS [process_name], [main_instance_data].[bp_id] AS [bp_id], [main_instance_data].[initiator_ip_address] AS [initiator_ip_address], [main_instance_data].[last_updated] AS [last_updated], [main_instance_data].[start_date] AS [start_date], [main_instance_data].[end_date] AS [end_date], [main_instance_data].[is_archived] AS [is_archived], [main_instance_data].[title] AS [title], [main_instance_data].[snapshot_user_id] AS [snapshot_user_id], [main_instance_data].[snapshot_username] AS [snapshot_username], [main_instance_data].[snapshot_displayname] AS [snapshot_displayname], [main_instance_data].[snapshot_sid] AS [snapshot_sid], [main_instance_data].[snapshot_email] AS [snapshot_email], [main_instance_data].[status] AS [status] FROM [dbo].[main_instance_data] AS [main_instance_data]) AS [Extent2] ON [Extent1].[bp_instance_id] = [Extent2].[bp_instance_id] INNER JOIN [dbo].[cf_user_snapshot] AS [Extent3] ON [Extent1].[user_snapshot_id] = [Extent3].[id] LEFT OUTER JOIN (SELECT [main_instance_data].[bp_instance_id] AS [bp_instance_id], [main_instance_data].[has_error] AS [has_error], [main_instance_data].[process_id] AS [process_id], [main_instance_data].[process_name] AS [process_name], [main_instance_data].[bp_id] AS [bp_id], [main_instance_data].[initiator_ip_address] AS [initiator_ip_address], [main_instance_data].[last_updated] AS [last_updated], [main_instance_data].[start_date] AS [start_date], [main_instance_data].[end_date] AS [end_date], [main_instance_data].[is_archived] AS [is_archived], [main_instance_data].[title] AS [title], [main_instance_data].[snapshot_user_id] AS [snapshot_user_id], [main_instance_data].[snapshot_username] AS [snapshot_username], [main_instance_data].[snapshot_displayname] AS [snapshot_displayname], [main_instance_data].[snapshot_sid] AS [snapshot_sid], [main_instance_data].[snapshot_email] AS [snapshot_email], [main_instance_data].[status] AS [status] FROM [dbo].[main_instance_data] AS [main_instance_data]) AS [Extent4] ON [Extent1].[bp_instance_id] = [Extent4].[bp_instance_id] WHERE ( EXISTS (SELECT 1 AS [C1] FROM [dbo].[cf_bp_processes] AS [Extent5] WHERE (CASE WHEN ([Extent5].[bp_id] IS NOT NULL) THEN [Extent5].[bp_id] ELSE -1 END IN (5)) AND (CASE WHEN ([Extent5].[bp_id] IS NOT NULL) THEN [Extent5].[bp_id] ELSE -1 END IS NOT NULL) AND ([Extent5].[process_id] = [Extent1].[process_id]) )) AND (99 <> [Extent1].[status]) AND (([Extent1].[title] LIKE N'%2732486A%') OR (([Extent3].[displayname] LIKE N'%2732486A%') AND ([Extent3].[user_id] > 0)) OR ([Extent3].[username] LIKE N'%2732486A%') OR (( EXISTS (SELECT 1 AS [C1] FROM [dbo].[formatted_variables] AS [Extent6] WHERE ([Extent1].[bp_instance_id] = [Extent6].[bp_instance_id]) AND ([Extent6].[attribute_id] IN (236, 264, 520, 186, 183, 184, 185)) )) AND ( EXISTS (SELECT 1 AS [C1] FROM [dbo].[formatted_variables] AS [Extent7] WHERE ([Extent1].[bp_instance_id] = [Extent7].[bp_instance_id]) AND ([Extent7].[value_string] LIKE N'%2732486A%') )))) ORDER BY [Extent1].[lastacted_date] DESC, [Extent1].[start_date] DESC OFFSET 0 ROWS FETCH NEXT 20 ROWS ONLY
I have been able to see a few other SQL queries that are very similar to the one above that correlate with the time we receive the termination/suspend email notifications.
We were able to find out which user performed the search and discovered that they were performing a search in Monitor. They did not have any of the filters on the left selected and all the drop-down filters were set to 'All'. They then put in the value they were searching for that caused the high wait times.
Is there anything that can be done to prevent this happening in the future?
Forms 11.0.2212.30907