Title: 504 scan error
Last modified: January 15, 2019

---

# 504 scan error

 *  Resolved [irishetcher](https://wordpress.org/support/users/irishetcher/)
 * (@irishetcher)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/504-scan-error/)
 * Hi Cory,
 * I am experiencing a scan error using Duplicator:
 * Server Status: 504 -error
    Error Message: Gateway Timeout The gateway did not
   receive a timely response from the upstream server or application.
 * I have followed all the options as suggested at this link:
 * [https://snapcreek.com/duplicator/docs/faqs-tech/#faq-package-025-q](https://snapcreek.com/duplicator/docs/faqs-tech/#faq-package-025-q)
 * and I have tested with all plugins off.
 * If you have any suggestions, much appreciated.
 * The following is a transcript of my support chat with Site Ground:
 * Stephen Vaughan: Hi,
 * I have been trying to do a backup of my site using the Duplicator plugin. I keep
   running into a scan error:
 * Server Status: 504 -error
    Error Message: Gateway Timeout The gateway did not
   receive a timely response from the upstream server or application.
 * Following instructions given by both SiteGround support and the plugin author
   I have paused Cloudflare. I am still getting the same error.
 * I have also tried some of the other troubleshooting checks as per this documentation
   from the plugin developer.
 * [https://snapcreek.com/duplicator/docs/faqs-tech/#faq-package-025-q](https://snapcreek.com/duplicator/docs/faqs-tech/#faq-package-025-q)
   
   Stephen Vaughan: This question is related to account:vaughanprint.com Ivaylo 
   Iv.: Hello Stephen ! Ivaylo Iv.: Welcome to SiteGround Hosting Services! Stephen
   Vaughan: Hi Ivaylo Iv.: Allow me a few moments to further investigate Ivaylo 
   Iv.: Thank you for your patience ! Would you please give it a try now ? Stephen
   Vaughan: Ok, Bear with me. Ivaylo Iv.: Absolutely, take your time ! I’ve uplifted
   the server limits, so hopefully this should do the trick. Stephen Vaughan: Unfortunately
   I am getting the same error. Ivaylo Iv.: Just checked the documentation and used
   their suggested code, may I ask you for another test ? Thank you ! Stephen Vaughan:
   Ok, just running it now. Ivaylo Iv.: Absolutely, no problem. I added you this
   code: SetEnvIf Request_URI “admin-ajax” DynamicTimeout=600 Ivaylo Iv.: As the
   reported Timeout is indeed related to the wp-admin ajax Stephen Vaughan: Ok. 
   If that is Option 1 from the documentation I tried it already with the timeout
   set to 240 and it didn’t work. Now it is reporting: 500 – Internal Server Error
   This is a temporary server error. Please try to reload the webpage later. If 
   you are the webmaster of this site please log in to Cpanel and check the Error
   Logs. You will find the exact reason for this error there. Common reasons for
   this error are: Incorrect file/directory permissions: Above 755. In order files
   to be processed by the webserver, their permissions have to be equal or below
   755. You can update file permissions with a FTP client or through cPanel’s File
   Manager. Incorrect Apache directives inside .htaccess file. Make sure you have
   not specified unsupported directives inside the local .htaccess file. Such include
   PHP settings and Apache module settings. Ivaylo Iv.: Just fixed permissions as
   the first probable cause of the error, secondly is it okay if I backup your current.
   htaccess Ivaylo Iv.: Then create a new one and add you the default WP code + 
   the timeout code ? Ivaylo Iv.: So we can test it this way Stephen Vaughan: Ok.
   let’s do that Ivaylo Iv.: Perfect, all set now. Perhaps are you able to clear
   your cache, log off from WordPress and then initiate the duplicator plugin once
   you’re logged in, thank you ! Stephen Vaughan: OK. Doing that now Ivaylo Iv.:
   Thank you, Stephen Stephen Vaughan: Same error again Ivaylo Iv.: Hm, that’s interesting,
   indeed. Although it’s a third party plugin, a lot of clients have used it. The
   cause of this error could come from multiple sources starting from the plugins
   and going all the way to server limits. Ivaylo Iv.: There are a few other plugins
   as an alternative you can use. Ivaylo Iv.: Also you can download a Full Website
   Copy from the SiteGround from the cPanel -> cPanel Backup -> Download A full 
   website Backup Stephen Vaughan: Ok. I might write to the plugin vendor to see
   if they have any suggestions and I will try the cPanel solution. Stephen Vaughan:
   Can you describe a bit more what you mean by: Stephen Vaughan: The cause of this
   error could come from multiple sources starting from the plugins and going all
   the way to server limits. Ivaylo Iv.: Sometimes a plugin is to compatible with
   another plugin, so in this case, this can be the cause of the error. In some 
   cases, due to its nature – WordPress plugin will take a lot of server resources
   as the script behind it is not properly optimized. Stephen Vaughan: OK. I will
   go off and do a bit more troubleshooting on this. Stephen Vaughan: Thanks for
   your help. Ivaylo Iv.: You’re most welcome, Stephen ! Ivaylo Iv.: Please, if 
   anything else comes up feel free to reach us back anytime ! Ivaylo Iv.: Best 
   wishes, and have a peaceful evening!

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [Cory Lamle](https://wordpress.org/support/users/corylamleorg/)
 * (@corylamleorg)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/504-scan-error/#post-11093905)
 * Hey [@irishetcher](https://wordpress.org/support/users/irishetcher/)
 * The only suggestions we have for that issue are the FAQ. We really don’t have
   any code we can add to the plugin to prevent a 504, you might also try some recommendations
   found here:
 * [https://www.wpbeginner.com/wp-tutorials/how-to-fix-the-504-gateway-timeout-error-in-wordpress/](https://www.wpbeginner.com/wp-tutorials/how-to-fix-the-504-gateway-timeout-error-in-wordpress/)
 * Hope that helps~
 *  Thread Starter [irishetcher](https://wordpress.org/support/users/irishetcher/)
 * (@irishetcher)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/504-scan-error/#post-11095836)
 * Thanks Cory,
 * Tried the suggestions from the link but no joy. Have reverted to another method
   of backup for the moment. Used Duplicator on a subdomain on the same site and
   it worked. That site doesn’t use Cloudflare so I think the problem lies somewhere
   between the hosting and the CDN.
 * Do I need to leave Cloudflare paused for a while for things to de-cache/de-propogate?
   Sorry if I use a not quite technical term there. The 504 doesn’t appear as a 
   blank page, no site. It comes up as a frame, with a message blaming Cloudflare,
   and just a message box with red text warning on the package creation page, when
   Cloudflare is paused.
 * I might get back to Site Ground on this. Will keep you posted.
 *  [Cory Lamle](https://wordpress.org/support/users/corylamleorg/)
 * (@corylamleorg)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/504-scan-error/#post-11096486)
 * We have seen issues where Cloudflare can cause issues. If it is possible I would
   try to turn it off during a scan/build if possible.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘504 scan error’ is closed to new replies.

 * ![](https://ps.w.org/duplicator/assets/icon-256x256.png?rev=2906985)
 * [Duplicator - Backups & Migration Plugin - Cloud Backups, Scheduled Backups, & More](https://wordpress.org/plugins/duplicator/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/duplicator/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/duplicator/)
 * [Active Topics](https://wordpress.org/support/plugin/duplicator/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/duplicator/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/duplicator/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Cory Lamle](https://wordpress.org/support/users/corylamleorg/)
 * Last activity: [7 years, 3 months ago](https://wordpress.org/support/topic/504-scan-error/#post-11096486)
 * Status: resolved