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

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

    Details

    • 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.

        Gliffy Diagrams

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated: