Manually Throttling a Large Number of Search Manager Updates

TechDoc supports performing a resubmit all from a DM to an SM from low to high priority. However, you many occasionally need complete manual throttling of updates to coordinate limited resources between difference groups. In order to do that, you can use the following procedure to have total control of resources when performing a large update.

  1. Optionally, wait for a quiet period to begin the operation
  2. Log into the DM as a TechDoc Admin
  3. Click Admin on the top menu and click "Background Tasks" under Miscellaneous.
  4. Click on the gears icon beside the SmUpdater task.
  5. Click Disable on the side menu, then click OK to confirm the disable. Refresh the page until the State is Disabled and the Status is blank.
  6. Now resubmit the SM updates. Normally, this would be done via "Resubmit All Documents" under "Search Manager" on the Admin screen. We would recommend the following settings when resubmitting the documents:

    Available SM Hosts: Choose the appropriate SM host
    Order: Newest Document First
    Priority: Low
    Reason: Your reason for doing this operation

  7. Now, go to the Document Manager database in SQL Service Management Studio and execute the following SQL statement:

    UPDATE SmUpdates SET RetryCount=-1,UpdatePriority=-250 WHERE SmCommand<>4;

  8. Now, log back into the DM as a TechDoc Admin
  9. Click Admin on the top menu and click "Show Pending Updates" under "Search Manager". You should see only 1 pending update called "** Marking all SM data **". All the rest of the updates should currently be stalled.
  10. Click Admin on the top menu and click "Background Tasks" under Miscellaneous.
  11. Click on the gears icon beside the SmUpdater task.
  12. Click Enable on the side menu, then click OK to confirm the enable.
  13. Click Start on the side menu, then click OK to confirm the start.
  14. Click Wake on the side menu, then click OK to confirm the wake.
  15. Click Admin on the top menu and click "Show Pending Updates" under "Search Manager". You should see that there are no pending updates.
  16. When you are ready to start processing updates, go to the Document Manager database in SQL Service Management Studio and execute the SQL statement below, change 100 to be the desired number of updates to move to pending status so that they can be processed the next time the SmUpdater task wakes up.

    UPDATE SmUpdates SET RetryCount=0 FROM (SELECT TOP 100 ParentID,ParentType,SmHostID,CreateDate FROM SmUpdates ORDER BY UpdatePriority DESC, CreateDate ASC) AS smup WHERE SmUpdates.ParentID=smup.ParentID AND SmUpdates.ParentType=smup.ParentType AND SmUpdates.SmHostID=smup.SmHostID and SmUpdates.CreateDate=smup.CreateDate;

    A little more info on the SQL above… The important part for you is TOP 100. The command will enable up to 100 rows. You can change 100 to be whatever number that you want. Consider starting small until you feel comfortable going larger.

    Note that the SQL is specifically written to enable, at most, that many updates. Say you left it set to 100 with 25 updates were already pending and execute the SQL. Only 75 more updates would be set to pending bringing the current total number of pending to 100. That way if you accidentally executed the SQL multiple times in a row, you don't end up with too many pending updates being scheduled.

  17. Because of the way this procedure is carried out, if a user creates or updates a document on the live system, their document should not have to wait too long before it gets processed even if you bumped the TOP number to a large value.
  18. If you run into any trouble and need to pause the update process, just stop running the SQL in step 16. You can leave the background task up and running and then live user requested updates will keep happening.

If something above doesn't make sense or needs more clarification, please do not hesitate to contact us before attempting to perform this procedure.

Product Type: