Skip to Content

Debug Long running job ?

How to debug a long running job ? is there any way ? yes. I am aware that we can debug via JDBG command in SM37. My issue is we have a program which runs for an hour or two. We are getting an error message after an hour of job execution.

If i give JDBG and press F8 debugger gets timed out in 10 minutes. I also thought of placing breakpoints in multiple intermediate places so that debugger will not time out, but there are few loops in standard program which takes more than 10 minutes to execute due to huge volume of data.

Is there any suggested way to do this ?

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Posted on Oct 24, 2019 at 01:49 PM

    SM50 -> Debugging of running Job

    You can Close Debugger any time and Programm continues

    and you can reenter Debugger as you wish.

    regards Stefan

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 24, 2019 at 02:19 PM

    Here is something else you can try to at least narrow down where the issue happens:

    Go to SM50 to make sure that you are looking at the server where your long-running batch-job is getting executed. From there go to transaction SAT (performance analysis) and make use of the "Run in parallel session":

    There you can switch on the measurement:

    Count to e.g. 10 and switch it off again:

    If SAT was able to capture anything during the time it was active, the measurement will be opened straight away and you can check it out.

    Note: You have to make sure to be on the server the process is actually running on. One option which usually works for me is to first go to SM50 (possibly via SM51) to find out which server it is and then open a new session for SAT from there. Or, use the "Server Selection" button to find the correct one from within SAT.

    To begin with, you shouldn't have the measurement active for more than a few second (hence "counting to 10") as the log can get pretty big very quickly!

    If you are not familiar with what all you can do with SAT, please check Olga Dolinskaja's blog series about this very neat transaction:

    Next Generation ABAP Runtime Analysis (SAT) – Introduction

    Hope this helps!

    Cheers

    Bärbel


    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 21, 2019 at 10:50 AM

    Hello,

    As far as I know there is no other way to avoid long running jobs timeouts than debugging and setting breakpoints. for the long loops you can set intermediate breaks by settnig break point condition for different sy-tabix.

    Also if the error is not due to the data size, you can reduce the data size by running the program for smaller scopes untill identifying which scope is triggering the error.

    Also you can analyze the error or the dump.

    Hope this is help.

    Regards,

    Yassine

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 21, 2019 at 07:28 PM

    SM50 or SM66, select the BGD workprocess corresponding to your job, menu Administration -> Program -> Debugging. Sometimes it doesn't work because in the middle of a database operation, or other reasons.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.