Fixing code monitor user not found execute errors

Scenario

Code monitor errors are generated by the worker and background jobs like 'codemonitors-job', 'code_monitors_trigger_jobs_worker'. 


In a case where a code monitor has been created and the user that created it is either deleted or can't be found, you'll see errors like:

less than 10 seconds ago for 29ms. Error: execute search: user not found: [100]

half a minute ago for 24ms. Error: execute search: user not found: [100]

less than a minute ago for 33ms. Error: execute search: user not found: [100]

1 minute ago for 52ms. Error: execute search: user not found: [100]

1 minute ago for 19ms. Error: execute search: user not found: [100]

 

Solution

This article assumes you have access to the frontend database. To fix this, you need to run the following SQL commands.

 

  1. Confirm if the user exists or not.
    SELECT deleted_at FROM users WHERE id = $user_id;
    If this query returns a date, then the user was deleted.

  2. Check if there are any active code monitors associated with the user.
    SELECT * from cm_monitors WHERE created_by = $user_id and enabled = 't';
  3. Disable the code monitors from the database.
    UPDATE cm_monitors SET enabled = 'f' WHERE id = $monitor_id;
     
Was this article helpful?
0 out of 0 found this helpful

Articles in this section