• Welcome to the Chevereto user community!

    Here users from all over the world gather around to learn the latest about Chevereto and contribute with ideas to improve the software.

    Please keep in mind:

    • 😌 This community is user driven. Be polite with other users.
    • 👉 Is required to purchase a Chevereto license to participate in this community (doesn't apply to Pre-sales).
    • 💸 Purchase a Pro Subscription to get access to active software support and faster ticket response times.

Unable to destroy delete-expired-images and clean-unconfirmed-users lock

Status
Not open for further replies.

mkerala

👽 Chevereto Freak
Website URL
https://gifyu.com

Chevereto version
3.10.12

Description of the issue
I am seeing below errors "Unable to destroy delete-expired-images and clean-unconfirmed-users lock" in Nginx error log for some time now.

I can confirm /var/www/html/app/content/locks folder has full permission for Nginx user and the folder is actually empty.

Do I need to be worried about below errors?

Code:
2018/04/08 09:24:03 [error] 86526#86526: *4158914 FastCGI sent in stderr: "PHP message: CHV\LockException: Unable to destroy delete-expired-images lock in CHV\Lock->process() in /var/www/html/app/lib/classes/class.lock.php:109

Stack trace:

#0 /var/www/html/app/lib/classes/class.lock.php(61): CHV\Lock->process('destroy', Array)

#1 /var/www/html/app/loader.php(290): CHV\Lock->__call('destroy', Array)

#2 [internal function]: CHV\{closure}()

#3 {main}" while reading upstream, client: 172.69.62.55, server: gifyu.com, request: "GET /image/LmY7 HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "gifyu.com"

2018/04/08 09:25:42 [error] 86525#86525: *4159550 FastCGI sent in stderr: "PHP message: CHV\LockException: Unable to destroy delete-expired-images lock in CHV\Lock->process() in /var/www/html/app/lib/classes/class.lock.php:109

Stack trace:

#0 /var/www/html/app/lib/classes/class.lock.php(61): CHV\Lock->process('destroy', Array)

#1 /var/www/html/app/loader.php(290): CHV\Lock->__call('destroy', Array)

#2 [internal function]: CHV\{closure}()

#3 {main}" while reading upstream, client: 141.101.76.181, server: gifyu.com, request: "GET /image/MNOa HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "gifyu.com"

2018/04/08 09:35:46 [error] 86525#86525: *4163463 FastCGI sent in stderr: "PHP message: CHV\LockException: Unable to destroy delete-expired-images lock in CHV\Lock->process() in /var/www/html/app/lib/classes/class.lock.php:109

Stack trace:

#0 /var/www/html/app/lib/classes/class.lock.php(61): CHV\Lock->process('destroy', Array)

#1 /var/www/html/app/loader.php(290): CHV\Lock->__call('destroy', Array)

#2 [internal function]: CHV\{closure}()

#3 {main}" while reading upstream, client: 162.158.78.37, server: gifyu.com, request: "GET /gabmuzealnew12/followers/?page=1&sort=date_asc HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "gifyu.com"

2018/04/08 09:35:46 [error] 86525#86525: *4163218 FastCGI sent in stderr: "PHP message: CHV\LockException: Unable to destroy clean-unconfirmed-users lock in CHV\Lock->process() in /var/www/html/app/lib/classes/class.lock.php:109

Stack trace:

#0 /var/www/html/app/lib/classes/class.lock.php(61): CHV\Lock->process('destroy', Array)

#1 /var/www/html/app/loader.php(303): CHV\Lock->__call('destroy', Array)

#2 [internal function]: CHV\{closure}()
 
app/lib/classes/class.lock.php

PHP:
                if(file_exists($lock_file) && !@unlink($lock_file)) {
                    throw new LockException('Unable to destroy ' . $this->lock . ' lock in ' . $method);
                }

Change @unlink to unlink and you will see the real warning.
 
I changed !@unlink to !unlink yesterday. But still getting same errors in log.

Code:
2018/04/10 18:23:39 [error] 86525#86525: *5519186 FastCGI sent in stderr: 2018/04/10 18:31:17 [error] 86526#86526: *5522745 FastCGI sent in stderr: "PHP message: CHV\LockException: Unable to destroy delete-expired-images lock in CHV\Lock->process() in /var/www/html/app/lib/classes/class.lock.php:109
Stack trace:
#0 /var/www/html/app/lib/classes/class.lock.php(61): CHV\Lock->process('destroy', Array)
#1 /var/www/html/app/loader.php(290): CHV\Lock->__call('destroy', Array)
#2 [internal function]: CHV\{closure}()
#3 {main}" while reading upstream, client: 172.68.47.219, server: gifyu.com, request: "GET /image/ST2e HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "gifyu.com", referrer: "https://gifyu.com/image/ST2e"
2018/04/10 18:39:12 [error] 86525#86525: *5526087 FastCGI sent in stderr: "PHP message: Envoi dupliqué" while reading response header from upstream, client: 162.158.155.47, server: gifyu.com, request: "POST /json HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "gifyu.com", referrer: "https://gifyu.com/"
2018/04/10 18:40:57 [error] 86525#86525: *5526749 open() "/var/www/html/wp-content/plugins/cherry-plugin/admin/css/cherry-admin-plugin.css" failed (2: No such file or directory), client: 141.101.77.221, server: gifyu.com, request: "GET //wp-content/plugins/cherry-plugin/admin/css/cherry-admin-plugin.css HTTP/1.1", host: "gifyu.com"
2018/04/10 18:53:48 [error] 86526#86526: *5532557 FastCGI sent in stderr: "PHP message: CHV\LockException: Unable to destroy clean-unconfirmed-users lock in CHV\Lock->process() in /var/www/html/app/lib/classes/class.lock.php:109
Stack trace:
#0 /var/www/html/app/lib/classes/class.lock.php(61): CHV\Lock->process('destroy', Array)
#1 /var/www/html/app/loader.php(303): CHV\Lock->__call('destroy', Array)
#2 [internal function]: CHV\{closure}()
#3 {main}" while reading upstream, client: 216.244.66.234, server: gifyu.com, request: "GET /image/bkfT HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "www.gifyu.com"
2018/04/10 19:11:09 [error] 86525#86525: *5539798 FastCGI sent in stderr: "PHP message: Duplicated upload" while reading response header from upstream, client: 108.162.241.235, server: gifyu.com, request: "POST /json HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "gifyu.com", referrer: "https://gifyu.com/"
2018/04/10 19:11:22 [error] 86525#86525: *5539798 FastCGI sent in stderr: "PHP message: Duplicated upload" while reading response header from upstream, client: 108.162.241.235, server: gifyu.com, request: "POST /json HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "gifyu.com", referrer: "https://gifyu.com/"
2018/04/10 19:13:57 [error] 86525#86525: *5541512 FastCGI sent in stderr: "PHP message: CHV\LockException: Unable to destroy delete-expired-images lock in CHV\Lock->process() in /var/www/html/app/lib/classes/class.lock.php:109
Stack trace:
#0 /var/www/html/app/lib/classes/class.lock.php(61): CHV\Lock->process('destroy', Array)
#1 /var/www/html/app/loader.php(290): CHV\Lock->__call('destroy', Array)
#2 [internal function]: CHV\{closure}()
#3 {main}" while reading upstream, client: 172.69.54.90, server: gifyu.com, request: "GET /image/Speb HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "gifyu.com"

Should I be changing !@unlink to unlink? Sorry I am not familiar with php operators.
 
Try enabling full error_reporing (PHP) because the thing that you want to know is the actual error screamed by unlink (putting @ before a function call disables php scream). The actual error thrown by that function is silenced by @ + server settings (not sure about this, check your server).

If the alleged function doesn't show any additional errors then no one can tell you why that thing is failing. I've seen this before, errors suppressed by the server or worse, something broken without even a sign of error log due to bad server configuration.

Most likely this is just permissions because php creates a file but then it can't touch it. The script attempts to create r+w files for the lock class, it doesn't check if such permissions are OK because it inherits these from the parent folder. In any case, please remember that Chevereto support is for actual script issues and this is a server issue. How you tweak and tune your server is totally outside the scope of support.

Make sure that these .lock files can be handled by php and if not, check if something in your server changes these permissions. Also, it could be just a file permission issue due to a backup you made earlier and you forgot to update permissions.

Hope you can sort it out, if you find a bug in the code please let me know.

Closed.
 
Status
Not open for further replies.
Back
Top