Job in hung state..How to fix

  • Good morning Experts,
    There is a job in hung state as shown above. Please help in troubleshooting this

  • You've been around long enough to know that you haven't provided nearly enough information.  What does the job do?  What makes you think it's hung?  How long does it normally take and how long has it taken so far this time?  Does the same thing happen if you run the same command(s) outside of the job?

    John

  • John Mitchell-245523 - Monday, July 17, 2017 4:00 AM

    You've been around long enough to know that you haven't provided nearly enough information.  What does the job do?  What makes you think it's hung?  How long does it normally take and how long has it taken so far this time?  Does the same thing happen if you run the same command(s) outside of the job?

    John

    Hi John,
    The job does DBCC CHECKDB on a single database.It runs every saturday. It usually takes 21 hours to complete, but for the last 2 saturdays, it took 1 day 7 hours 32 minutes to complete. How to find out why it took longer time?

  • So it's not hung as such, it's just taking longer?  What has changed?  Do you have more data than you had before?  Do you maintain your statistics and indexes with the same frequency as you did before (that may or may not make a difference to DBCC run duration)?  Is there any other activity on the database or server or disks at the same time as the job runs?  Do you have plenty of free space on the drives on which your database files reside in case of any growth in the files for the internal snapshot that the DBCC process creates?

    John

  • John Mitchell-245523 - Monday, July 17, 2017 5:05 AM

    So it's not hung as such, it's just taking longer?  What has changed?  Do you have more data than you had before?  Do you maintain your statistics and indexes with the same frequency as you did before (that may or may not make a difference to DBCC run duration)?  Is there any other activity on the database or server or disks at the same time as the job runs?  Do you have plenty of free space on the drives on which your database files reside in case of any growth in the files for the internal snapshot that the DBCC process creates?

    John

    Hi John,
    The database grew by 79686 MB. But just for 79686 MB data, DBCC CHECKDB taking 10 more hours of time is not satisfying me.

  • So monitor the server. Capture the wait statistics of this process to understand where and why it's running slow. None of us without any kind of knowledge of your server, access to it, or the hyper-minimal amount of information you've provided are going to go "Oh, that's the dinglefarb setting. Change it from "purple" to "42" and everything will run faster." Here's an example on how to capture wait statistics for a single query. Gather those metrics and maybe we can make some suggestions. I would also suggest you monitor for blocked processes. It could be that this process is simply waiting on others as well as waiting on resources.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • Grant Fritchey - Monday, July 17, 2017 8:07 AM

    So monitor the server. Capture the wait statistics of this process to understand where and why it's running slow. None of us without any kind of knowledge of your server, access to it, or the hyper-minimal amount of information you've provided are going to go "Oh, that's the dinglefarb setting. Change it from "purple" to "42" and everything will run faster." Here's an example on how to capture wait statistics for a single query. Gather those metrics and maybe we can make some suggestions. I would also suggest you monitor for blocked processes. It could be that this process is simply waiting on others as well as waiting on resources.

    HI Grant,
    Please let me know what information you require.

  • coolchaitu - Monday, July 17, 2017 9:24 AM

    Grant Fritchey - Monday, July 17, 2017 8:07 AM

    So monitor the server. Capture the wait statistics of this process to understand where and why it's running slow. None of us without any kind of knowledge of your server, access to it, or the hyper-minimal amount of information you've provided are going to go "Oh, that's the dinglefarb setting. Change it from "purple" to "42" and everything will run faster." Here's an example on how to capture wait statistics for a single query. Gather those metrics and maybe we can make some suggestions. I would also suggest you monitor for blocked processes. It could be that this process is simply waiting on others as well as waiting on resources.

    HI Grant,
    Please let me know what information you require.

    So, considering I say above "Capture the wait statistics of this process" and "Here's an example" and "Gather those metrics", I'm actually seriously confused by this follow-up question.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • coolchaitu - Monday, July 17, 2017 4:46 AM

    John Mitchell-245523 - Monday, July 17, 2017 4:00 AM

    You've been around long enough to know that you haven't provided nearly enough information.  What does the job do?  What makes you think it's hung?  How long does it normally take and how long has it taken so far this time?  Does the same thing happen if you run the same command(s) outside of the job?

    John

    Hi John,
    The job does DBCC CHECKDB on a single database.It runs every saturday. It usually takes 21 hours to complete, but for the last 2 saturdays, it took 1 day 7 hours 32 minutes to complete. How to find out why it took longer time?

    So what's the size of the database now?

    Grant Fritchey - Monday, July 17, 2017 11:21 AM

    coolchaitu - Monday, July 17, 2017 9:24 AM

    Grant Fritchey - Monday, July 17, 2017 8:07 AM

    So monitor the server. Capture the wait statistics of this process to understand where and why it's running slow. None of us without any kind of knowledge of your server, access to it, or the hyper-minimal amount of information you've provided are going to go "Oh, that's the dinglefarb setting. Change it from "purple" to "42" and everything will run faster." Here's an example on how to capture wait statistics for a single query. Gather those metrics and maybe we can make some suggestions. I would also suggest you monitor for blocked processes. It could be that this process is simply waiting on others as well as waiting on resources.

    HI Grant,
    Please let me know what information you require.

    So, considering I say above "Capture the wait statistics of this process" and "Here's an example" and "Gather those metrics", I'm actually seriously confused by this follow-up question.

    To add to that, what is the size of the database now?

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • Can you check the auto growth on the database to see what it is set to?

  • Marsha - Tuesday, July 18, 2017 2:35 PM

    Can you check the auto growth on the database to see what it is set to?

    It is set to unlimited. The SQL Server version is 2014 RTM EE. We are facing issue only on this one server.

  • There is growth amount define at either in % percentage or by size (ie 50 mgs) set on each of the database files.
    What is it set to?

Viewing 12 posts - 1 through 11 (of 11 total)

You must be logged in to reply to this topic. Login to reply