open-lms-open-source / moodle-local_redislock

6 stars 17 forks source link

Debugging #14

Closed kisonay closed 2 years ago

kisonay commented 2 years ago

How does one debug this via the CLI? I've implemented it and my site is now responding incredibly slow. I would like to see what is going on.

kisonay commented 2 years ago

Finally, saw the logging in the normal logs... and seeing this:

Dec 10 08:46:42 moodle-5c56d8ff59-nhfjt moodle [Fri Dec 10 14:46:42.099733 2021] [php7:warn] [pid 10] [client 10.244.3.225:34188] PHP Warning:  Redis::connect() expects parameter 2 to be int, string given in /var/www/html/local/redislock/classes/lock/redis_lock_factory.php on line 381, referer: https://xxx.com/login/index.php

My Redis database requires tls, I assume that the process or removing the non-custom port number and the tls:// in the hostname is breaking this. Is it possible to have a tls connection?

kisonay commented 2 years ago

Turns out my issue was related to https://github.com/open-lms-open-source/moodle-local_redislock/issues/16 and how the connection is made. Had to make a slight tweak to account for the tls:// on the hostname.