Friday, February 24, 2012

Large SB messages cannot be dispatched ?

Hi All\Remus

I have a very weird SB problem in production, we currently have a microsoft case open but are not getting anywhere with it at the moment.

Perhaps someone out there or Remus can shed some light.

Let me give you some background, we have a service borker application using permenant dialogs between remote store Sql Server Express databases (initiator), that send messages on the same dialog to a central database (target).Over a VERY slow network.

Let me reiterate the network is very slow and experiences frequent timeouts, this is the nature of the network and a reason why went with service broker.

Last week we released a new version of the smart client app that uses SB messaging, the only change to SB was the size of the messages, they went from 20KB to over 200KB. NOTHING else changed, existing dialogs, routes, messages etc are still being used.

As soon as the first new large message was sent to central it could not get there, i pick up the following error in Profiler:

This message was dropped because it could not be dispatched on time. State: 2 1 - Sequenced Message.

I had since run many tests, i have skipped that message and let the normal process run , message are successfully delivered until it comes to a large message again then everything stops and the same errors occurs again.

I can send messages up to 30KB as soon it it is over 50KB they never get to the target and all i see is this error in profiler.

Now i need someone to explain to me what happens in the background, i know SB will break big messages up into smaller pieces, i do not know at what size this happens or how SB keeps track of the progress of a big message.

From my testing and results I am ussuming that the first piece of the message is received and SB keeps checking if packets are being received if SB it not receiving any packets anymore(network timeout) or there is a message to live timeout that expires before the complete message is received. This error occurs and it drops the message and tries again.

This gets me into an inifinite loop due to the slow network and message sizes we never actually get a message delivered, all i get is the error message constantly.

Is there some sort of timeout happening if the whole message connot be received in x seconds ? Is it due to SB checking the status of the message but getting timeouts ?

What i have done as a work around is no longer putting large binary data into the messages, therefore they are back to the original size and everyting works, smaller bianry data messages go through so it has nothing to do with the message data. As soon as a message exceeds +-40KB they cannot be delivered and i get the error above.

P.S i tried sending the same binary data from target to initiator as a test, the message never got there either but the error was different i got the following error:

This forwarded message was dropped because the message could not be delivered within the message time to live.

I cannot find anything in BOL or the net about changing or configuring a message time to live.However i do think this is perhaps the issue.

Thern this was followed by alot of Broker Forwarded Message Sent events from the test service but the message never got there and i never saw the first error again, so i am still confused abuot that too ?

Can anyone please help here ... Thanx

Send me the case number (you still have my mail, don't you?)|||

Hi Remus

the case number is SRQ070831600601.

Nope sorry i do not have your email anymore, lost a laptop in the interim, however all my contact dedtails are on the case details, i have sent though profiler traces, log files etc on the case. Please contact me or let me know if there is anything else i can do to assist.

This case has been standing still since friday, the say they cannot find a Service Broker expert Engineer currently, i really appreciate the help.

Thank You

|||This has been resolved with a Microsoft case, requires a hotfix, to be released in October.

No comments:

Post a Comment