• Resolved jamesbuck

    (@jamesbuck)


    Hi, when I click “Backup now” the backup only attempts to run for a brief second, and no error is given. If I read the log, it says “Failed to gain semaphore lock” and to try after 3 minutes. This persists with multiple attempts and when using Debug Backup. Full log below. Thanks!

    0000.001 (0) UpdraftPlus WordPress backup plugin (https://updraftplus.com): 1.12.17 WP: 4.5.3 PHP: 5.2.17 (Linux mini-buildd-4 3.2.0-openvz042stab112.15 #1 SMP Mon Oct 26 15:23:44 CET 2015 i686 GNU/Linux) MySQL: 5.1.73 WPLANG: en_US Server: Apache safe_mode: 0 max_execution_time: 900 memory_limit: 256M (used: 37.3M | 37.5M) multisite: Y openssl: OpenSSL 0.9.8o 01 Jun 2010 mcrypt: Y LANG: ZipArchive::addFile: Y
    0000.002 (0) Free space on disk containing Updraft’s temporary directory: 621873.3 MB
    0000.005 (0) Tasks: Backup files: 0 (schedule: unset) Backup DB: 1 (schedule: unset)
    0000.010 (0) Requesting semaphore lock (d) (apparently not via scheduler)
    0000.012 (0) Semaphore lock (d) failed (line 41)
    0000.013 (0) Failed to gain semaphore lock (d) – another backup of this type is apparently already active – aborting (if this is wrong – i.e. if the other backup crashed without removing the lock, then another can be started after 3 minutes)

    https://www.ads-software.com/plugins/updraftplus/

Viewing 14 replies - 1 through 14 (of 14 total)
  • Plugin Author David Anderson

    (@davidanderson)

    Hi James,

    Try the “Wipe Settings” button in the “Advanced Tools” tab – does that fix it?

    David

    Thread Starter jamesbuck

    (@jamesbuck)

    Thanks – tried that, no change, same error log:

    0000.081 (0) Failed to gain semaphore lock (fd) – another backup of this type is apparently already active – aborting (if this is wrong – i.e. if the other backup crashed without removing the lock, then another can be started after 3 minutes)

    Plugin Author David Anderson

    (@davidanderson)

    Hi James,

    That’s very odd, since wiping settings removes the locks too. If you run this SQL query after wiping the settings, what is the result?

    SELECT * FROM wp_options WHERE ( option_name LIKE ‘updraftplus_unlocked_%’ OR option_name LIKE ‘updraftplus_locked_%’ OR option_name LIKE ‘updraftplus_last_lock_time_%’ OR option_name LIKE ‘updraftplus_semaphore_%’ )

    Change wp_options to match the name of your options table (i.e. change the wp_ prefix to match your prefix).

    David

    There is no reply from @jamesbuck, but I can tell you I’ve been having the same problem as well as the same error, and I’ve done the same procedure.

    When running the SQL query above, I get this:

    
    mysql> SELECT * FROM wp_22crc9_options WHERE ( option_name LIKE 'updraftplus_unlocked_%' OR option_name LIKE 'updraftplus_locked_%' OR option_name LIKE 'updraftplus_last_lock_time_%' OR option_name LIKE 'updraftplus_semaphore_%' );
    +-----------+-------------------------------+---------------------+----------+
    | option_id | option_name                   | option_value        | autoload |
    +-----------+-------------------------------+---------------------+----------+
    |     30386 | updraftplus_last_lock_time_   | 2016-03-11 10:28:40 | yes      |
    |     30379 | updraftplus_last_lock_time_fd | 2016-09-03 01:46:16 | yes      |
    |     30378 | updraftplus_locked_fd         | 1                   | yes      |
    |     30387 | updraftplus_semaphore_        | 0                   | yes      |
    |     30380 | updraftplus_semaphore_fd      | 1                   | yes      |
    |     30385 | updraftplus_unlocked_         | 1                   | yes      |
    +-----------+-------------------------------+---------------------+----------+
    6 rows in set (0.00 sec)
    
    • This reply was modified 8 years, 2 months ago by remino. Reason: Formatting

    Although, my error message differs a bit:

    
    Opened log file at time: Sat, 03 Sep 2016 01:53:54 +0000 on https://remino.net/bits
    UpdraftPlus WordPress backup plugin (https://updraftplus.com): 2.12.20.1 WP: 4.6 PHP: 5.5.38 (Linux alleghany 3.2.61-grsec-modsign #1 SMP Tue Aug 12 09:58:26 UTC 2014 x86_64) MySQL: 5.6.25 WPLANG: en_CA Server:  safe_mode: 0 max_execution_time: 900 memory_limit: -1 (used: 55.3M | 56.3M) multisite: N openssl: OpenSSL 1.0.1 14 Mar 2012 mcrypt: Y LANG:  ZipArchive::addFile: Y
    Free space on disk containing Updraft's temporary directory: 1051055.7 MB
    Tasks: Backup files: 1 (schedule: daily) Backup DB: 1 (schedule: daily)
    Requesting semaphore lock (fd) (apparently not via scheduler)
    Fatal error: Call to a member function log() on a non-object in <em>redacted</em>/wp-content/plugins/updraftplus/includes/class-semaphore.php on line 176
    
    Plugin Author David Anderson

    (@davidanderson)

    Hi @remino,

    www.ads-software.com rules don’t allow queries about plugins purchased commercially to be dealt with on their website – https://codex.www.ads-software.com/Forum_Welcome#Commercial_Products – so please post here instead: https://updraftplus.com/paid-support-requests/ . When you do so, please let us know how you’re running UD, and what opcache modules you have in your PHP setup.

    Best wishes,
    David

    Actually, I have 6 WordPress sites. All of them have UpdraftPlus. Only one (the one from which I’ve shown the log above) has a paid licence. They’re all doing the same thing.

    Plugin Author David Anderson

    (@davidanderson)

    Hi @remino,

    If you have one from another site, please can you open your own new thread, as per the request of the www.ads-software.com forum operators? (https://codex.www.ads-software.com/Forum_Welcome#Where_To_Post – “Unless you are using the same version of WordPress on the same physical server hosted by the same hosts with the same plugins, theme, and configurations as the original poster, do not post in someone else’s thread.”).

    Many thanks,
    David

    Okay, I understand there are policies, but it really looked like there was a bug to me. Everything was working fine, then the moment I update UpdraftPlus, it’s failing. Failing in cron and failing from wp-admin.

    I modified updraftplus.php and added this line. This is my diff:

    
    *** updraftplus-orig.php Sat Sep  3 07:24:44 2016
    --- updraftplus.php Sat Sep  3 07:39:57 2016
    *************** if (!file_exists(UPDRAFTPLUS_DIR.'/class
    *** 151,156 ****
    --- 151,157 ----
      
            require_once(UPDRAFTPLUS_DIR.'/class-updraftplus.php');
            $updraftplus = new UpdraftPlus();
    +       $GLOBALS['updraftplus'] = $updraftplus;
            $updraftplus->have_addons = $updraftplus_have_addons;
      
            if (!$updraftplus->memory_check(192)) {
    

    Now, everything is working the way it should again.

    Plugin Author David Anderson

    (@davidanderson)

    So, your plugins don’t load in a global context? How does that come to be?

    I have this problem too (posted in my other thread and then found this) When I ran the SQL query, above, there were no results.

    This is driving me nuts. I wiped the settings, I revoked the updraft permissions from my google account, I deleted the api credentials and made new ones and I’m STILL getting this message:

    0000.567 (0) Requesting semaphore lock (fd) (apparently not via scheduler)
    0000.571 (0) Semaphore lock (fd) failed (line 41)
    0000.574 (0) Failed to gain semaphore lock (fd) – another backup of this type is apparently already active – aborting (if this is wrong – i.e. if the other backup crashed without removing the lock, then another can be started after 3 minutes)

    How can I start with a clean slate with UpdraftPlus? There must be a way?

    Plugin Contributor DNutbourne

    (@dnutbourne)

    Hi,

    Please could you look in the ‘wp-content/updraft’ directory of your site? You should find a number of log files. Please could you check for any recent log files where two or more were generated within 3 minutes of each other?
    This is to check if the backup task is being triggered multiple times.

    Yes, according to the log files I have, there are multiple logs within a few mins of each other:

    logs screenshot

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘"Failed to gain semaphore lock" – not backing up’ is closed to new replies.