If a job gets stuck in the job queue, it can prevent other jobs from running as expected. This can occur in different scenarios, such as when a scan job does not progress or when other background jobs remain in an active or scheduled state longer than expected.
This article explains how to clear all jobs or a specific job from the job queue by updating the database directly. Although scan jobs are used as an example, these steps apply to all job types.
IMPORTANT: It is recommended to have a database backup before performing any steps documented below.
Option 1: Clear All Jobs From the Queue
Use this option to terminate all active, waiting, or scheduled jobs.
NOTE: Before you begin, note that although these actions can be performed while Tomcat is running, shutting down Tomcat is strongly recommended to avoid unintended behavior.
MySQL
- Shut down Tomcat.
- Run the following queries:
UPDATE PSE_SCHEDULER_QUEUES SET ACTIVE_TASK_ID_ = NULL; UPDATE PSE_SCHEDULER_TASKS SET STATE_ = 'TERMINATED' WHERE STATE_ IN ( 'ACTIVE', 'WAITING_ON_UPDATE', 'WAITING_ON_LIBRARY_REFRESH', 'SCHEDULED' ); - Start Tomcat.
Microsoft SQL Server
- Shut down Tomcat.
- Run the following queries:
UPDATE PSE_SCHEDULER_QUEUES SET [ACTIVE_TASK_ID_] = NULL; UPDATE PSE_SCHEDULER_TASKS SET [STATE_] = 'TERMINATED' WHERE [STATE_] IN ( 'ACTIVE', 'WAITING_ON_UPDATE', 'WAITING_ON_LIBRARY_REFRESH', 'SCHEDULED' ); - Start Tomcat.
Option 2: Clear a Specific Job From the Queue
Use this option when only one job (for example, a specific scan job) needs to be cleared.
Step 1: Find the Job ID
- In the Code Insight UI, open the menu from the top-right corner (hamburger icon).
- Select Jobs.
- Note the Job ID for the scan you want to remove.
Job ID Shown in the Jobs Page
Step 2: Remove the Specific Job
Replace "Job ID" in the queries below with the actual job ID you noted.
MySQL
- Shut down Tomcat.
- Run the following queries:
UPDATE PSE_SCHEDULER_QUEUES SET ACTIVE_TASK_ID_ = NULL WHERE ACTIVE_TASK_ID_ = "Job ID"; UPDATE PSE_SCHEDULER_TASKS SET STATE_ = 'TERMINATED' WHERE ID_ = "Job ID"; - Start Tomcat.
Microsoft SQL Server
- Shut down Tomcat.
- Run the following queries:
UPDATE PSE_SCHEDULER_QUEUES SET [ACTIVE_TASK_ID_] = NULL WHERE [ACTIVE_TASK_ID_] = "Job ID"; UPDATE PSE_SCHEDULER_TASKS SET [STATE_] = 'TERMINATED' WHERE ID_ = "Job ID"; - Start Tomcat.
After completing these steps, the selected job or jobs are removed from the job queue. The Jobs page should no longer show the terminated jobs, and other jobs should be able to run normally.
Related Articles
Code Insight Remote Docker Scans Might Take a Very Long Time (Up to Several Days) Due to npm Registry Timeouts 15Number of Views Select Exact Matches or Source Code Matches when creating FlexNet Code Insight Scan Profile 6Number of Views "Arithmetic overflow error converting IDENTITY to data type int." error when running a custom business adapter 18Number of Views Code Insight Reports 8Number of Views FlexNet Code Insight Cannot copy Project with ClearCase configuration 3Number of Views
Hi, I am Reva - Ask me anything.
No new updates
Thanks for the feedback!
Your feedback has been saved.Rate this response:
Add Additional feedback ( Optional )
Are you sure you want to cancel
the case creation?
Are you sure you want to cancel the case creation?
Are you sure you want to close this case
| Products | Region | Phone Numbers |
|---|---|---|
| FlexNet Operations FlexNet Embedded FlexNet Publisher FlexNet Connect FlexNet Code Insight InstallAnywhere InstallShield |
North America * |
+1 630-332-2513 (toll) +1 877-279-2853 (toll-free in North America) |
| Europe * |
+44 1925 944367 (toll) +44 800 047 8642 (toll-free in Europe) |
|
| Japan * | +81 3-4540-5335 (select option 2) | |
| Australia * |
+61 3 9895 2177 +61 1800 560 603 (toll-free in Australia) |
|
|
Usage Intelligence (formerly
Revulytics) Compliance Intelligence |
Please use the Case Portal to submit your support ticket or reach out to your Revenera contact. | |
Case id: 00001065
Activity: Status change: 2 hours ago