Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2004
    Location
    Bangalore, India
    Posts
    250

    Question Unanswered: SQL server 2012 Enabling service broker keeps CPU busy at 100%

    In a customer environment, it was noticed that CPU is at 100% while enabling service broker. the queue has approx 1 million requests. Since CPU is at 100% the application is not usable.
    what is the best way to clear all requests?



    As per http://stackoverflow.com/questions/1...e-broker-queue
    there are two options. kindly explain while one is recommended on a prod box


    while(1=1)
    begin
    waitfor (
    receive top(1)
    conversation_group_id
    from dbo.yourQueue;

    if (@@rowcount = 0)
    begin
    break;
    end
    ), timeout 1000;
    end


    OR

    declare @c uniqueidentifier
    while(1=1)
    begin
    select top 1 @c = conversation_handle from dbo.queuename
    if (@@ROWCOUNT = 0)
    break
    end conversation @c with cleanup
    end

    Thanks,
    Baburaj
    Cheers....

    baburajv

  2. #2
    Join Date
    Feb 2004
    Location
    Bangalore, India
    Posts
    250
    There are around 1.2 million records in sys.conversation_endpoints "where is_initiator = 1 and far_service = "<MyService>".
    I was thinking to do END CONVERSATION for all these messages after disabling the broker queue. Is this advisable?
    Cheers....

    baburajv

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •