question

Felipe Silva avatar image
Felipe Silva asked

Problem with Waits

Friends, In the next days I´ve had a problem with an specific wait type but I don´t know waht to do to solve that. Wait Type: BROKER_RECEIVE_WAITFOR Query Text: WAITFOR(RECEIVE conversation_handle, service_contract_name, message_type_name, message_body FROM ExternalMailQueue INTO @msgs), TIMEOUT @rec_timeout I think maybe is something related by database mail. But the database just send a few emails a day. Can anyone help me?
wait-type
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Grant Fritchey avatar image
Grant Fritchey answered
That's a Service Broker wait type, probably not related to email. Here's an [MSDN entry][1] on the topic. I'd suggest reading this. [1]: http://blogs.msdn.com/b/sql_service_broker/archive/2008/12/01/service-broker-wait-types.aspx
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Kevin Feasel avatar image
Kevin Feasel answered
In [Paul Randal's outstanding post on wait stats][1], he describes BROKER_RECEIVE_WAITFOR as basically the Service Broker twiddling its thumbs and waiting to do something. His recommendation is to filter it out, as it is a benign wait: it's waiting because there's nothing going on, not because something is preventing it from doing work. [1]: http://www.sqlskills.com/BLOGS/PAUL/post/Wait-statistics-or-please-tell-me-where-it-hurts.aspx
2 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Felipe Silva avatar image Felipe Silva commented ·
So, it isn´t a problem?
0 Likes 0 ·
Kevin Feasel avatar image Kevin Feasel commented ·
If you aren't noticing a major problem with any Service Broker tasks, then no. Given that you'd probably know if you were having a major problem with Service Broker (for example, if you have Database Mail set up and it takes several minutes to receive an e-mail that should have been almost instantaneous), I'd say it's most likely not a problem.
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.