Content Management and Capture

 View Only
Expand all | Collapse all

Datacap Server issuing too many SQL to Database per Rulerunner request. Why?

  • 1.  Datacap Server issuing too many SQL to Database per Rulerunner request. Why?

    Posted Tue June 11, 2024 07:24 AM
    Edited by dsakai Tue June 11, 2024 08:03 AM

    Hi.

    Our project has installed 2 Datacap Servers and 6 Rulerunner Servers on separate machines.

    Each Rulerunner Server operates with 8 threads. So there are 48 Rulerunner threads simultaneously accessing Datacap Server.

    We are baffled. When we checked Database accesss, there were 600 Select SQL  issued PER SECOND.

    This happened when 48 threads were simultaneously executing mvscan action on an empty scan folder every several seconds.

    We now use sameskipbatch to mitigate too much db load. But I want to know why each Task fetch by Datacap Server throws multiple Select SQL?

    It is selecting from Queue table. Isn't one Select from Queue enough? What parameters are responsible for this behavior?

    I want to decrease the number of Select SQLs per second.



    ------------------------------
    dsakai
    ------------------------------



  • 2.  RE: Datacap Server issuing too many SQL to Database per Rulerunner request. Why?
    Best Answer

    Posted 27 days ago

    Why not stop all your thread and just leave one running.  Focus one task such as scan.   See if it create query every 10 seconds.  Because by default in RR server manager the sleep time is 10 seconds.  Meaning every 10 seconds RR server thread wakes up and look for batch to process. 

    You also have to account for any task that is doing SQL call in a ruleset doing open and close connection. 

    So 48 thread - each thread will sleep and wake up every 10 seconds querying for batch to process.  That's 48x10=480 query every 10 seconds.
    But 600 select per second is high.  You also have Job Monitor open and it research automatically also.  So depend on the query statement, you should be able to find our who and what select statement is coming from.



    ------------------------------
    Duke Lam
    ------------------------------