[Snapshot Pro] Snapshot backup is not working 504 Gateway Time-out,

Snapshot backup is not working because of Nginx it get me 504 Gateway Time-out, Nginx, after having

but my settings were validated by the snapshot testing environement

128M (Default)
max_execution_time
300 (Default)
max_input_time
300 (Default)
post_max_size
8M (Default)
upload_max_filesize
2M (Default)
opcache.enable
on (Default)
disable_functions
opcache_get_status (Default)

Its on a plesk, apache Php 7.1, with Nginx.
It’s stay stuck at 86% for a long time and then block

I see in console a lot of Ajax calls, like the last one
{“DonnĂ©es de formulaire”:{“action”:”snapshot_backup_ajax”,”snapshot-proc-action”:”file”,”snapshot-action”:”update”,”snapshot-item”:”1574950289″,”snapshot-data-item”:”1574958810″,”snapshot-file-data-key”:”media”,”security”:”2bd1bb4f43″}}

and then 504
{“DonnĂ©es de formulaire”:{“action”:”snapshot_backup_ajax”,”snapshot-proc-action”:”file”,”snapshot-action”:”update”,”snapshot-item”:”1574950289″,”snapshot-data-item”:”1574958810″,”snapshot-file-data-key”:”plugins”,”security”:”2bd1bb4f43″}}

  • Kris Tomczyk
    • Ex Staff

    Hi Renaud Hamelin

    I hope you are doing good today.

    Those are only console errors which does not say to much. 504 Gateway Time-out means that there is not enough time to finish the process, which could be due to a large site, large files.

    To investigate this more I will need the below data from you.

    Please send it through our secure contact form here https://wpmudev.com/contact/#i-have-a-different-question and make sure that subject is “I have a different question” and:
    – Mark to my attention: ATTN: Kris Tomczyk

    – Site access:
    — login url
    — username
    — password

    – FTP
    — host
    — username
    — password
    — port

    – Link back to this thread

    Please don’t share any sensitive information (i.e credentials) in the Support Forum, it has public visibility and everyone will have access to it.

    Please confirm here in the thread that you have sent that message.

    Kind Regards,
    Kris

  • Kris Tomczyk
    • Ex Staff

    Hi Renaud Hamelin

    Thank you for the updates and additional data you send.

    I made some tests and review on FTP and here are the results:

    There is some other backup plugin on the site, however, it is not used at all and no large additional backups on FTP. Also, I cannot see any other large files there.

    1. For Managed Backups, I add below define in wp-config.php
    define('SNAPSHOT_MB_BREADTH_FIRST', true);
    And Managed backup runs ok.

    2. For Simple Snapshots I add below define in wp-config.php
    define('SNAPSHOT_FORCE_ZIP_LIBRARY', 'pclzip');
    to force another type of compression. Then I ran 2 backups -> local and to google drive. Both were fully made under 3min.

    Kind Regards,
    Kris

    • Torsten
      • torsten3d

      Hi,

      also had this error and spend a lot of time to test getting that fixed – then i finally found this post here.

      “2. For Simple Snapshots I add below define in wp-config.php
      define(‘SNAPSHOT_FORCE_ZIP_LIBRARY’, ‘pclzip’:wink:;”

      Finally worked for me.
      Would be nice to have that hint or link to this solutions directly below the error message…

      • Kris Tomczyk
        • Ex Staff

        Hi Torsten

        I hope you are doing good today.

        By default, Snapshot does not require any additional defines and it should work correct out of the box. Depend on server settings, server resources, site size, and many more factors, we add specific define to wp-config. This define was not design to a specific error in Snapshot. However, I’m glad that this work for you :slight_smile:

        Kind Regards,
        Kris

  • Kris Tomczyk
    • Ex Staff

    Hi Renaud

    By default, we do not document those defines as Snapshot should work ok. Depend on server resources/settings there is a possibility that it could not work. We have some additional defines and mix of defines which helps in such cases. The reason why we do not document those defines is that they can be used incorrect and if any issue appears we need to check server resources before we apply any of those.

    Kind Regards,
    Kris