Error Message after upgrade - The operation timed out while waiting for a lock

Error Message after upgrade - The operation timed out while waiting for a lock

by Stephan Häberle -
Number of replies: 6

Hi,

I've upgraded Moodle from Version 3.3 to 3.5 and now I recieve the error message "The operation timed out while waiting for a lock." when accessing any site of moodle.

For the upgrade I've followed the instructions of this article: https://docs.moodle.org/35/en/Upgrading

Befor upgrading the site which causes Problems, I've upgraded an other, similar site. No problem showed up on the other site.
I've already restored the Server ro re-run the upgrade. But I recieve the error "The operation timed out while waiting for a lock." again and can't access moodle at all.

The only further error message I've found is when I try to access https://my.moodle.site/admin/settings.php. On this page I can see the error message "Required parameter 'section' is missing" and "The operation timed out while waiting for a lock".

Any idea how to solve this error? I currently can't access moodle at all.

Attachment Error.PNG
Attachment Error2.PNG
Average of ratings: -
In reply to Stephan Häberle

Re: Error Message after upgrade - The operation timed out while waiting for a lock

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

How are your sessions set up?

In reply to Howard Miller

Re: Error Message after upgrade - The operation timed out while waiting for a lock

by Stephan Häberle -

I didn't adjust anything regarding the session handling. I'm using the default settings of moodle.

As I'm quite new to moodle, I don't know which information you need exactly. Can I deliver you any outputs from the Database or config files? Please let me know.

Thanks!

In reply to Stephan Häberle

Re: Error Message after upgrade - The operation timed out while waiting for a lock

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

This is normally an error reported in connection with Scheduled Tasks (i.e. cron jobs), although it's not impossible I suppose. 

Can you do three things...

- enable Debugging by copying the lines from section 7 of config-dist.php to config.php

- completely delete the 'cache/' directory under your moodledata / $CFG->dataroot directory (not your Moodle program code)

- Purge the caches using https://docs.moodle.org/35/en/Administration_via_command_line#Purge_caches


If you're lucky it might fix it. Failing that we should at least find where the error is originating. 

Average of ratings: Useful (1)
In reply to Howard Miller

Re: Error Message after upgrade - The operation timed out while waiting for a lock

by Stephan Häberle -
After Deleting the cache/ directory the site works again.


Thank you for your help.

In reply to Stephan Häberle

Re: Error Message after upgrade - The operation timed out while waiting for a lock

by Anandham K -

when I am upgrade moodle 3.3 to 3.5 , I am also getting same error.

Fix:
in my case I set permission for 0777 in my lock folder then its working fine.

In reply to Anandham K

Re: Error Message after upgrade - The operation timed out while waiting for a lock

by Swathy Prabhu -

The lockfiles in the lock subdirectory in the moodledata may have missing permissions, such as rw-r--r-- and owned by another user, such as root (!!)

The way I solved this problem is to change the ownership of the lock directory to www-data by the following command.

$ chown -R www-data:www-data /var/www/moodledata/lock

(Please note that the moodledata in my case is under /var/www)