AppD Archive

Ignoring MSMQ Exceptions

CommunityUser
Splunk Employee
Splunk Employee

Hi All,

App-Dynamics is reporting a lot of exceptions being thrown in my application. When I drill into the detail I see the following stack trace:

System.Messaging.MessageQueueException (0x80004005): Timeout for the requested operation has expired.

at System.Messaging.MessageQueue.ReceiveCurrent(TimeSpan timeout, Int32 action, CursorHandle cursor, MessagePropertyFilter filter, MessageQueueTransaction internalTransaction, MessageQueueTransactionType transactionType)

at System.Messaging.MessageQueue.Peek(TimeSpan timeout)

at NServiceBus.Unicast.Queuing.Msmq.MsmqMessageReceiver.HasMessage()

After a bit of googling, it seems that this error is a perfectly safe exception that is thrown and handled by a framework we are using on top of MSMQ and happens when there are no messages in the queue to be handled.

So I would like to ignore these errors. I have two questions:

1) I thought that handled exceptions were not logged by App Dynamics, so I wouldn't have expected to see them. Is that right?

2) When I add an 'Ignored Exceptions' entry for the name 'System.Messaging.MessageQueueException' with a matching condition on the message of just 'Is Not Empty' it doesn't work. What am I missing?

Please help me!! Thanks in advance for any suggestions

Cheers,

Rob.

0 Karma
1 Solution

Venu_Babu_Thang
Communicator

Hi Rob,

When you configure an exception to be ignored, AppDynamics still detects the exception, logs the exception, increments the exception count, and displays the exception in the Exceptions subtab of the Errors tab and in the Summary and Error Details sections of any transaction snapshot. However, the status of the transaction snapshot Summary would not be marked as ERROR. Ignoring an exception simply means that AppDynamics does not increment the business transaction error count for errors caused by exceptions that have been configured to be ignored.  Please refer to the below document link for the details.

http://docs.appdynamics.com/display/PRO14S/Configure+Error+Detection#ConfigureErrorDetection-Configu...

Thanks,

Venu.

View solution in original post

Venu_Babu_Thang
Communicator

Hi Rob,

1) 

If the exception is handled within a business transaction, then AppDynamics does not mark the business transaction as an error. For example: 

Business transaction entry point -> some code -> some exception thrown -> exception caught inside a business transaction -> business transaction finished. In this case AppDynamics does not report the exception.

2) Actually, the rule should work. After adding the exception rule, still the busienss transaction(which are part of MessageQueueException) marked as an error? If yes, to isolate the problem can you please share with us the below details

1) Export the error snapshot(which are part of MessageQueueException) call graph to pdf and share with us. 

2) Zip of latest "DotNetAgent" folder from the server.

The default location of "DotNetAgent" folder is as mentioned below.
1. Windows Server 2008 and later: %ProgramData%\AppDynamics\
2. Windows Server 2003: %AllUsersProfile%\Application Data\AppDynamics\

Thanks,

Venu.

0 Karma

CommunityUser
Splunk Employee
Splunk Employee

Hi Venu,

Thanks for your quick response!

I'm assuming by business transaction you mean an app dynamics business transaction being monitored and not a code level transaction. In which case yes you are correct for point 1, the business transactions themselves are not being marked as an error. 

The only place I see the error listed is under the exceptions section on the dashboard where it is showing the number of exceptions per minute and also in the metrics browser it links to. But I was thinking that if it was being handled then it wouldn't be shown here either. 

For point 2 - do the error detection ignore rules just ignore with regards to business exceptions, or do these also stop them being counted in the exceptions section of the dashboard and the metrics?

Thanks again for your help!

Rob

0 Karma

Venu_Babu_Thang
Communicator

Hi Rob,

When you configure an exception to be ignored, AppDynamics still detects the exception, logs the exception, increments the exception count, and displays the exception in the Exceptions subtab of the Errors tab and in the Summary and Error Details sections of any transaction snapshot. However, the status of the transaction snapshot Summary would not be marked as ERROR. Ignoring an exception simply means that AppDynamics does not increment the business transaction error count for errors caused by exceptions that have been configured to be ignored.  Please refer to the below document link for the details.

http://docs.appdynamics.com/display/PRO14S/Configure+Error+Detection#ConfigureErrorDetection-Configu...

Thanks,

Venu.

CommunityUser
Splunk Employee
Splunk Employee

Thanks for the clarification Venu!

Sorry I missed that statement from the documentation. So it sounds like there is no way to remove these exceptions and stop them skewing the data. It makes it really hard to see real exceptions that need attention. 

This is a real shame as there are several hundred exceptions being reported per minute which is just the messaging framework we use checking against MSMQ and is expected behaviour. (this is also completely out of our control)

Anyway, if there is a way to log this as a feature suggestion or improvement, please let me know. 

Otherwise thanks for the clarification.

0 Karma

CommunityUser
Splunk Employee
Splunk Employee

Hi Rob,

We will check this internally if we have a possiblity of raising a feature request for this and will update you accordingly. 

Thanks,

Vishnu

0 Karma

CommunityUser
Splunk Employee
Splunk Employee

Hi Rob,

Thank you for your patience. We have raised a feature request for the feature you requested. 

Thanks,

Vishnu

0 Karma
Get Updates on the Splunk Community!

See just what you’ve been missing | Observability tracks at Splunk University

Looking to sharpen your observability skills so you can better understand how to collect and analyze data from ...

Weezer at .conf25? Say it ain’t so!

Hello Splunkers, The countdown to .conf25 is on-and we've just turned up the volume! We're thrilled to ...

How SC4S Makes Suricata Logs Ingestion Simple

Network security monitoring has become increasingly critical for organizations of all sizes. Splunk has ...