Service Virtualization

  • 1.  SQL query took a long time

    Posted Jan 09, 2018 08:20 AM

    Hello,

     

    When I'm running a VS, I've got the following message twice in registry.log : 

    2018-01-09 13:10:37,603Z (14:10) [qtp776796622-232] WARN com.itko.lisa.utils.db.LisaSessionCustomizer - SQL query took a long time (155 ms) : SELECT t1.ACTIVITY_ID, t1.DESCRIPTION, t1.LICENSE_TYPE, t1.ACTIVITY_NAME, t1.PARENT_ACTIVITY_ID, t0.ROLE_ID FROM ACL_ROLES_ACTIVITIES t0, ACL_ACTIVITIES t1 WHERE ((t1.ACTIVITY_ID = t0.ACTIVITY_ID) AND (t0.ROLE_ID IN ?))

     

    What should I check/modify in order to turn off this message ?

     

    Benoit



  • 2.  Re: SQL query took a long time

    Broadcom Employee
    Posted Jan 09, 2018 09:31 AM

    Is your Registry connected to an external database?

     

    If so, doing a ping to where the external database is running and make sure the RTT is under 20ms.



  • 3.  Re: SQL query took a long time

    Posted Jan 09, 2018 09:39 AM

    Registry is connected to an external database.

    Ping done, time is about 0.125 ms.



  • 4.  Re: SQL query took a long time

    Broadcom Employee
    Posted Jan 09, 2018 10:02 AM

    What version of DevTest and what is the release and version of the external database?



  • 5.  Re: SQL query took a long time

    Posted Jan 09, 2018 10:21 AM

    DevTest 10.1 with Oracle 12.

    If it can be usefull : we have the same log message with DevTest 8.1 and an older version of Oracle (ping time about 0.022ms) but no need to solve it.



  • 6.  Re: SQL query took a long time

    Broadcom Employee
    Posted Jan 09, 2018 11:16 AM

    It appears that the Registry connection is being delayed by the access to the Oracle database.

    This may be related to a database problem, CPU usage on the Oracle database or a network problem.

    I am not sure how to turn off this particular message, what is your log4j.rootCategory=INFO,A1 set in the logging.properties file?



  • 7.  Re: SQL query took a long time

    Posted Jan 10, 2018 02:48 AM

    root category is set to info : log4j.rootCategory=INFO,A1

    And I'd like not to modify it, but try solve the root cause of the message.

    I'll check the database.



  • 8.  Re: SQL query took a long time

    Posted Jan 10, 2018 09:24 AM

    Stats were missing on database. Once up-to-date, I still have the warn message : 

    2018-01-10 14:13:34,997Z (15:13) [qtp1475225596-84] WARN com.itko.lisa.utils.db.LisaSessionCustomizer - SQL query took a long time (109 ms) : SELECT t1.ACTIVITY_ID, t1.DESCRIPTION, t1.LICENSE_TYPE, t1.ACTIVITY_NAME, t1.PARENT_ACTIVITY_ID, t0.ROLE_ID FROM ACL_ROLES_ACTIVITIES t0, ACL_ACTIVITIES t1 WHERE ((t1.ACTIVITY_ID = t0.ACTIVITY_ID) AND (t0.ROLE_ID IN ?))

    And no trace of abnormal activity on the database server.

     

    What is the thresold for this message ? Can it be modify ? 



  • 9.  Re: SQL query took a long time

    Posted Jan 16, 2018 02:19 AM

    Marcy, any idea for the thresold ?



  • 10.  Re: SQL query took a long time
    Best Answer

    Posted Jan 24, 2018 09:50 AM

    The com.itko.lisa.utils.db.LisaSessionCustomizer warnings are generated at login only - and represent the activity required to gather and initialise the rights and roles of a given user.

    This lookup is slow, and the warning is generated from a global alert designed to catch any slow query. As it takes place from an infrequent activity that takes place only at session start, this message is benign. The query itself is complex, and slow, rather than being a problem with your database.

    Addng

    log4j.logger.com.itko.lisa.utils.db.LisaSessionCustomizer=ERROR

    to your logging.properties file suppresses this benign warning.