I am running Availability Groups on SQL Server 2014 with one database in the group. Today, the server was responding very slowly and when I got on the server I found that the Availability Groups service account had over 25000 sessions open. Every session was to the MSDB database with the same query, The query was:
(@P1 nvarchar(max), @P2 uniqueidentifier, @P3 int, @P4 int, @P5 int) DECLARE @logTextWithPreAndPost nvarchar(max) set @logTextWithPreAndPost = N'' + @P1 + N''; EXECUTE msdb.dbo.sp_agent_write_sysjobstep_log @job_id = @P2, @is_system = @P3, @step_id = @P4, @log_text = @logTextWithPreAndPost, @append_to_last=@P5
Does anyone know why it would hold so many sessions open or what I can do to stop it.