1

Yesterday I did a production simulation. The results where not good. The connection between the two servers is OK. From time to time there is huge delay, about 5-10 minutes. I send a message, two, three.. twenty and the other side do not receives them. And then boom, all messages are there and the reply is send to the sender. The other situation is when I send 10 messages, the other side receives them momentarily and replies. But the replies are not received by the sender. After 5-10 minutes BOOM, the replies are here.

What is goin on. please help me.

====================
EDIT: Both servers are windows XP sp3. Both computers are connected with openVPN. NSB is the latest version.

UI <= duplex => applicaiton server <= publish/subscribe => Denormalizer(readonly database)

Yesterday I tested only the duplex. In a 1PC environment everything goes smoothly. When the duplex is ready I will test the 3rd part.

mynkow
  • 4,408
  • 4
  • 38
  • 65
  • Can you provide more information about the environment? Type/OS of the servers and how the network is configured? Are you using the Full Duplex pattern? Also, what version of NSB? – Adam Fyles Sep 21 '10 at 12:44
  • Could be a VPN issue. Is there latency between the machines? Also, you may want to take a look at DTCPing to make sure MSDTC is working correctly: http://www.microsoft.com/downloads/en/details.aspx?FamilyID=5e325025-4dcd-4658-a549-1d549ac17644. I would also throw logging on MSDTC. Anything in the Event Logs? – Adam Fyles Sep 21 '10 at 16:20
  • The connection is ok. No other errors. Just the delay from time to time with no reason. I am sure that the problem is in NSB because I noticed a pattern, for example when I delete all queues and do a fresh start for both sides. I thought that this is some kind of a init delay and after that the bus will work correctly but I was wrong and the delays appeared again. – mynkow Sep 21 '10 at 22:05
  • If you fully delete the queues instead of purging them, then there will be a delay when NSB starts up as it has to create queues on both side prior to sending any transactions. Any other slowness could be due to logging levels or latency between machines. I would try purging instead of blowing them away. – Adam Fyles Sep 22 '10 at 12:24
  • I would love to hear about any explanation. Today I noticed the same delay in our production environment (windows server 2008, 2-node cluster). There is no delay in the testing system (exactly same hardware, only a little less memory than on production system). On both clusters messages are sent every 110 seconds. It works correctly on the test system, on production system it looks like messages are collected and then send all together. After that, for 10 or 15 minutes, again nothing happens. Then several message arrive at once again. – Jens H Oct 13 '10 at 13:58
  • @Sensei76: Exactly. http://tech.groups.yahoo.com/group/nservicebus/message/8714 May be Udi is thinkin at the moment "Damn, some1 even reproduced the bug." LOL (Joke) – mynkow Oct 18 '10 at 06:17

1 Answers1

0

Do you use active directory? I remember reading that AD can cause issues with MSMQ. Something along the lines of some lookup tables being huge and slowing down things... Anyway can't remember precisely, but just a thought.

Otherwise, I suggest starting with having both endpoints on 1 computer, and working from there. Slowly add variables until it breaks again.

EDIT: Try adding this line to your config:

.RunCustomAction(() => NServiceBus.Configure.Instance.Configurer.ConfigureProperty<MsmqTransport>(
                    mt => mt.SecondsToWaitForMessage, 2))

I'm not sure how you go about configuring this if you are using the host though. My config looks like:

    _Bus = NServiceBus.Configure.With()
                  .DefaultBuilder()
                  .Log4Net(new MyLogAppender())
                  .XmlSerializer()
                  .MsmqTransport()
                      .IsTransactional(true)
                      .PurgeOnStartup(true)
                  .UnicastBus()
                      .ImpersonateSender(false)
                      .DoNotAutoSubscribe()
                      .LoadMessageHandlers()
                  .RunCustomAction(() =>
                    NServiceBus.Configure.Instance.Configurer.ConfigureProperty<MsmqTransport>(
                    mt => mt.SecondsToWaitForMessage, 2))
                  .CreateBus()
                  .Start();

I have an issue where my MSMQ queues will timeout regularly, creating delay that way. However the default timeout is only in the seconds (15 seconds iirc?). Never been able to work out why it is happening, I think it is something funny in the MSMQ libraries. I really doubt the same issue would cause 10min+ delays, but it's worth a try.

mike
  • 3,146
  • 5
  • 32
  • 46
  • No AD. But I will try what u suggested and report the results here. – mynkow Oct 25 '10 at 18:51
  • You should also try running a continuous ping (i.e., ping ip.address -t) over a period where you are experiencing the issue, to check whether any network congestion/lag is happening. – mike Oct 25 '10 at 23:05
  • Yes mrnye, this was the first thing I did actually. There is no such a problem. – mynkow Oct 31 '10 at 16:42