Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-32236

SQLSRV db unit test cannot complete, driver's sp_getapplock query timing out.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Cannot Reproduce
    • Affects Version/s: 2.2.2
    • Fix Version/s: None
    • Component/s: Database SQL/XMLDB
    • Labels:
    • Affected Branches:
      MOODLE_22_STABLE

      Description

      It seems the using the SQLSRV driver on apache on win2k8 server is causing time outs.
      I am unable to run the function DB unit tests to completion due to this error.

      Fatal error: Maximum execution time of 30 seconds exceeded in C:\server\workspace\mssql\lib\dml\sqlsrv_native_moodle_database.php on line 1330 (integration.git/master, for moodle.git/master its 'on line 1328' atm)

      the query seems to be

      ...
              $sql = "BEGIN
                          DECLARE @result INT
                          EXECUTE @result = sp_getapplock @Resource='$fullname',
                                                          @LockMode='Exclusive',
                                                          @LockOwner='Session',
                                                          @LockTimeout='$timeoutmilli'
                          SELECT @result
                      END";

      after this error, any other moodle page is timing out as well.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              dobedobedoh Andrew Lyons
              Reporter:
              nebgor Aparup Banerjee
              Participants:
              Component watchers:
              Andrew Lyons, Dongsheng Cai, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: