Loading

How to Troubleshoot a Long Running Job in B2C Commerce

게시 일자: Apr 11, 2025
상세 설명

Resolve situations when a job appears to be running longer than its expected runtime and/or seems to be hung in B2C Commerce.

솔루션
Confirm that the job is running longer than usual.
  1. Find the custom log file of the job.
  2. Look at the timestamp of the last log entry within the custom job log file.
  3. If the above timestamp is far from the current time, the job is most probably long-running.

Identify errors associated with the long-running job. Check application error logs via WebDAV or LogCenter. See if you can associate the error with a specific blade.

It is better to resolve the underlying cause of the error, rather than to push for one-time changes that will push this specific job to completion. This reduces the likelihood of the issue recurring for the next scheduled job.
  • If you do understand and are able to fix the underlying error/s, you can (1) wait for the job to finalize, or (2) restart your application to kill the job. After the restart, the job's status may still indicate that it is running, at which point any Business Manager instance administrator can delete the execution on the Job History page.
 
  • If you do not understand, and/or are not able to fix the underlying error/s, please create a case with Commerce Cloud Support. Provide the following so that we can address the immediate issue of the job and gather information to fix the underlying error:
    • Instance URL;
    • Job Name;
    • Custom Logs;
    • Any customizations (pipelines, scripts, etc.) used in the job; and
    • Application error logs

It is important to understand that if an unhandled exception occurs during a job run, the job will fail. It also means that if an exception is handled, such as by custom code with a try/catch block, the job will not fail but continue to run. For this reason, when using try/catch blocks within a job implementation, any exception occurring within the try block will be logged as per the catch instruction set , and will also swallow the exception. This explains why the Job Failure Rule mechanism of the Job Framework is not triggered when running into non-stopping/swallowed exceptions. If the exception is not propagated with a throw statement, it will basically never reach the job framework.
Knowledge 기사 번호

000391640

 
로드 중
Salesforce Help | Article