skip to main content

SAP NetWeaver Newbie

Background jobs stuck in Ready status or their poor load balancing

If you have multiple application servers, change and set the parameter rdsip/btctime to a different value on each one eg. 56, 57,58,59 etc. The job scheduler "SAPMSSY2" runs every "rdisp/btctime" seconds (60 by default) and looks for all the pending jobs in the job queue and assigns them to the available free batch work processes in the system.

If there are other batch work processes waiting while the jobs are in the ready status, ensure that you have not over-allocated batch WPs for Class A jobs only. You can change such allocation from the transaction RZ04.

If you find that WPs are not over-allocated to Class A jobs, it could be that a job is blocking access to the WPs. Run temse check as explained below and kill/restart the WPs that are in waiting status to get the WP working.
  • Run Transaction SM65
  • Select Goto > Additional tests
  • Select these options:
    • Perform TemSe check
    • Consistency check DB tables
    • List
    • Check profile parameters
    • Check host names
    • Determine no. of jobs in queue
    • All job servers
    • Then click on execute
  • Once you get the results check to see if you have any inconsistencies in any of your tables.
  • If there are any inconsistencies reported then run the "Background Procesing Analyses" (SM65 > Goto > Additional Tests) again. This time check the "Consistency check DB tables" and then "Remove Inconsistencies" options.
  • Run this a couple of times until all inconsistencies are removed from the tables.
  • NOTE: Make sure you run this SM65 check when the system is quiet and no other batch jobs are running as this would put a lock on the TBTCO table till it finishes. This table may be needed by any other batch job that is running or scheduled to run at the time SM65 checks are running.
Jobs stuck in ready status could also be a result of a system shutdown. When a background job is set to ready status it is waiting for something to trigger it. If thesystem shuts down while the job is in ready status, the trigger for it
will never occur. Thus it is stuck and never gets out of ready status. If that is the case with these jobs, you have to delete them and restart them. An easy way to prevent this from happenening in the future is to have more background
WP set up on the time when most of these background jobs are supposed to run and try avoiding background jobs scheduled during your regular maintenance window.

Overflow of the dispatcher queue can also contribute to the problem. Increase the dispatcher queue size by increasing the the parameter value rdisp/elem_per_queue from default to a higher value, say by 50%.

To clean up these hung jobs, select them in transaction SM37 and choose the menu option Job -> Check status. You will be asked if you want to set the job to status Scheduled. You can choose yes, then re-release the job.

Check out SAP note 519059 and other notes referenced by it for more details.

No comments:

Post a Comment

Email Subscription

Get every new post into your inbox by subscribing us.

Want a reason to subscribe?
1. This sitemap might convince you to subscribe.
2. We do not misuse email IDs. We respect privacy.

© 2008 - 2017 sapnwnewbie. All rights reserved.