msdb.dbo.sp_readrequest;1 – long running process

When monitoring the new installed version of SQL 2008 R2 SP1, I have encountered that Database mail leaves a hung process few minutes. This doesn’t do any blockages or other trouble to your SQL installation, either that it is anoying to see over and over again this long running process. In order to get rid off it, just check the system parameter value for “DatabaseMailExeMinimumLifeTime” running the following query:

Use msdb
exec sysmail_help_configure_sp 'DatabaseMailExeMinimumLifeTime'

The default setting will be 600. You need to change it to a lower period.

Use msdb
exec sysmail_configure_sp 'DatabaseMailExeMinimumLifeTime', 30

That’s all!


  1. Perfect, exactly what I was looking for after seeing this show up in my long running queries list. The error message in my case:

    Suspended, WAITFOR(RECEIVE conversation_handle, service_contract_name, message_type_name, message_body FROM ExternalMailQueue INTO @msgs), TIMEOUT @rec_timeout — Check if there was some error in reading from queue

  2. Thanks ! 🙂

  3. Thanks for this! I was going to research it as I noticed it on my reports for sometime. This was quick and easy and found your post at the top!! Good stuff!!

  4. Of course, you *might* want to look into what this actually *DOES*, understand your system mail requirements (how often do you send mail?), and determine if your are actually increasing the system load by lowering this default value – your are forcing the mail service connection to start/stop and reopen connections to your SMTP server more often the lower you set this value. Do you kill the idle thread from the SQL agent, because you don’t like seeing it in your connection list all the time either?

  5. Of course you MIGHT and of course you SHOULD, because my post is a recommendation/solution for me not a rule for anybody.
    Beside that, I feel the offending tone in your remark. No I don’t kill the SQL Server Agent thread.
    If you wanted to make a certain recommendation it wouldn’t have bothered me. Thank you for reading my blog.
    Next time try to be less ostentatious.

  6. Hi yrushka,
    thanks for this article, is seems to be one of the most quick and precise one available.But however I also feel like some further information could be helpful, how did you find out and where could one find further documentation? I would really like to understand what is going on with this sp_readrequest…

Leave a Comment

NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>