Hi All,
Application team reported an incident about timeout error occurred b/w the application and database very frequently.
Application is connecting database server via JDBC drivers. I am not clear whether the issue related to database or application end.
Environment Details: Windows Server 2012 OS;SQL Server 2012 - Enterprises edition; 34GB RAM; 30 GB is configured to SQL services.
JBoss Server log extract below:
2014-02-07 11:54:32,530 INFO [STDOUT] (Dispatcher-Thread-29) 2014-02-07 11:54:32,515 [ WorkManager(2)-43] [ STANDARD] [ PegaRULES:06.03] (cess.ThreadConnectionStoreImpl) ERROR - There was a problem rolling back a transaction: The connection is closed.com.microsoft.sqlserver.jdbc.SQLServerException: The connection is closed.
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:171)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.checkClosed(SQLServerConnection.java:319)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.rollback(SQLServerConnection.java:1639)
When I was running SQL server profiler to capture the events, I found too many RPC statements coming out with an exception and User Error messages. I have attached two samples events.
declare @p1 int
set @p1=0
declare @p2 int
set @p2=0
declare @p7 int
set @p7=0
declare @p17 varchar(max)
set @p17=NULL
exec sp_cursorprepexec @p1 output,@p2 output,N'@P0 varchar(8000),@P1 varchar(8000),@P2 varchar(8000),@P3 varchar(8000),@P4 varchar(8000),@P5 varchar(8000),@P6 datetime2,@P7 varchar(8000),@P8 varchar(8000),@P9 varchar(8000) OUTPUT',N'EXEC sppr_sys_reservequeueitem_b
@P0, @P1, @P2, @P3, @P4, @P5, @P6, @P7, @P8, @P9 OUT
',4112,8193,@p7 output,'pr_sys_queues','System-Queue-ScheduledTask','Pega-RulesEngine:ScheduledTaskProcessor','Scheduled','46c4196499d7b5e303817fa6ca324243',NULL,'2014-02-11 18:58:39.1370000','true',NULL,@p17 output
select @p1, @p2, @p7, @p17
Exception : Incorrect syntax near the keyword 'DECLARE'.
User Error Message : Incorrect syntax near the keyword 'DECLARE'.
User Error Message : Executing SQL directly; no cursor.
declare @p1 int
set @p1=0
declare @p2 int
set @p2=0
declare @p7 int
set @p7=0
declare @p17 varchar(max)
set @p17=NULL
exec sp_cursorprepexec @p1 output,@p2 output,N'@P0 varchar(8000),@P1 varchar(8000),@P2 varchar(8000),@P3 varchar(8000),@P4 varchar(8000),@P5 varchar(8000),@P6 datetime2,@P7 varchar(8000),@P8 varchar(8000),@P9 varchar(8000) OUTPUT',N'EXEC sppr_sys_reservequeueitem_b
@P0, @P1, @P2, @P3, @P4, @P5, @P6, @P7, @P8, @P9 OUT
',4112,8193,@p7 output,'pr_sys_queue_startflows','System-Queue-StartingFlows','Pega-ProCom:GenerateStartingFlows','Scheduled','46c4196499d7b5e303817fa6ca324243',NULL,'2014-02-11 18:58:40.9160000','true',NULL,@p17 output
select @p1, @p2, @p7, @p17
Exception : Incorrect syntax near the keyword 'DECLARE'.
User Error Message : Incorrect syntax near the keyword 'DECLARE'.
User Error Message : Executing SQL directly; no cursor.
Other than above events there is no events triggered related to connection time out in the profiler.
Thanks
Raghu