No internet connection
  1. Home
  2. Support

Failed during "Deploying files to BunnyCDN", please consult the Help tab for where to get assistance.

By @abhi2020-02-22 11:25:48.546Z

Hi, I have already deployed two other sites on BunnyCDN. But this particular site has 158+ posts and too many media files.
It partially uploads the static-files on BunnyCDN and then fails after sometimes. I have tried reducing the upload batch size, API delays but these didn't help. Here is a piece from /var/log/nginx/error.log:

2020/02/22 08:54:52 [error] 7008#7008: *184847 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught Exception: Exception: BAD RESPONSE STATUS FROM API (400) in /var/www/mysite.com/wp-content/plugins/static-html-output-plugin/plugin/WP2Static/SitePublisher.php:2
Stack trace:
#0 /var/www/mysite.com/wp-content/plugins/static-html-output-plugin/plugin/deployers/BunnyCDN.php(2): WP2Static_SitePublisher->checkForValidResponses()
#1 /var/www/mysite.com/wp-content/plugins/static-html-output-plugin/plugin/deployers/BunnyCDN.php(2): WP2Static_BunnyCDN->createFileInBunnyCDN()
#2 /var/www/mysite.com/wp-content/plugins/static-html-output-plugin/plugin/deployers/BunnyCDN.php(2): WP2Static_BunnyCDN->upload_files()
#3 /var/www/mysite.com/wp-content/plugins/static-html-output-plugin/plugin/deployers/BunnyCDN.php(2): WP2Static_BunnyCDN->__construct()
#4 /var/www/mysite.com/wp-content/plugins/static-html-output-plugin/plugin/WP2Static/Dispatcher.php(2): require_once('/var/www/mysite...')
#5 /var/www/mysite.com/wp-content/plugins/static-html-output-plugin/wp2static.php" while reading response header from upstream, client: xxx.xxx.202.xx, server: mysite.com, request: "POST /wp-admin/admin-ajax.php HTTP/2.0", upstream: "fastcgi://unix:/run/php/php7.4-fpm.sock:", host: "mysite.com", referrer: "https://mysite.com/wp-admin/admin.php?page=wp2static"

Solved in post #4, click to view
  • 3 replies
  1. Leon Stafford @leonstafford2020-02-22 12:50:22.021Z

    Hi @abhi,

    Hmm, let's see if it's failing on a particular file.

    If you could please enable Debug Mode in the Advanced tab, re-run the export and then send me your Debug Log that results when it fails. We should be able to see the last file it attempted before failure.

    Bunny API can be more fussy about rate limits, but it sounds like you've ruled those out with trying different settings.

    Other less ideal workarounds are to use Bunny's FTP option to transfer into storage or use the Zip deploy option, then drop into their web UI, but this will be extra slow if your internet connection doesn't have a good speed to Bunny...

    Cheers,

    Leon

    1. A@abhi2020-02-22 14:01:47.610Z2020-02-22 14:10:48.330Z

      Thank you for your response, Leon. I' using the Devanagari script for URLs.

      Crawling /हमसे-संपर्क-करें/
      Adding discovered URL: /%e0%a4%b9%e0%a4%ae%e0%a4%b8%e0%a5%87-%e0%a4%b8%e0%a4%82%e0%a4%aa%e0%a4%b0%e0%a5%8d%e0%a4%95-%e0%a4%95%e0%a4%b0%e0%a5%87%e0%a4%82/
      Adding discovered URL:
      Adding discovered URL: /feed/
      Adding discovered URL: /comments/feed/
      Adding discovered URL: /wp-json/
      Adding discovered URL: /%E0%A4%B9%E0%A4%AE%E0%A4%B8%E0%A5%87-%E0%A4%B8%E0%A4%82%E0%A4%AA%E0%A4%B0%E0%A5%8D%E0%A4%95-%E0%A4%95%E0%A4%B0%E0%A5%87%E0%A4%82/
      Adding discovered URL: /
      Adding discovered URL: /quiz/
      Adding discovered URL: /history/
      Adding discovered URL: /politics/
      Adding discovered URL: /general-science/
      Adding discovered URL: /economics/
      Adding discovered URL: /geography/
      Adding discovered URL: /miscellaneous/
      Adding discovered URL: /privacy-policy-2/
      Adding discovered URL: /%e0%a4%b9%e0%a4%ae%e0%a4%be%e0%a4%b0%e0%a5%87-%e0%a4%ac%e0%a4%be%e0%a4%b0%e0%a5%87-%e0%a4%ae%e0%a5%87%e0%a4%82/
      Adding discovered URL: /%e0%a4%a8%e0%a4%bf%e0%a4%af%e0%a4%ae-%e0%a4%8f%e0%a4%b5%e0%a4%82-%e0%a4%b6%e0%a4%b0%e0%a5%8d%e0%a4%a4%e0%a5%87%e0%a4%82/
      SAVING /हमसे-संपर्क-करें/ to /var/www/mysite.com/wp-content/uploads/wp-static-html-output-1582367072//हमसे-संपर्क-करें/index.html
      Memory allocated by crawl script: 4096
      BAD RESPONSE STATUS FROM API (400)
      Deployment: error encountered
      Exception: BAD RESPONSE STATUS FROM API (400) in /var/www/mysite.com/wp-content/plugins/static-html-output-plugin/plugin/WP2Static/SitePublisher.php:2
      Stack trace:
      #0 /var/www/mysite.com/wp-content/plugins/static-html-output-plugin/plugin/deployers/BunnyCDN.php(2): WP2Static_SitePublisher->checkForValidResponses()
      #1 /var/www/mysite.com/wp-content/plugins/static-html-output-plugin/plugin/deployers/BunnyCDN.php(2): WP2Static_BunnyCDN->createFileInBunnyCDN()
      #2 /var/www/mysite.com/wp-content/plugins/static-html-output-plugin/plugin/deployers/BunnyCDN.php(2): WP2Static_BunnyCDN->upload_files()
      #3 /var/www/mysite.com/wp-content/plugins/static-html-output-plugin/plugin/deployers/BunnyCDN.php(2): WP2Static_BunnyCDN->__construct()
      #4 /var/www/mysite.com/wp-content/plugins/static-html-output-plugin/plugin/WP2Static/Dispatcher.php(2): require_once('/var/www/mysite...')
      #5 /var/www/mysite.com/wp-content/plugins/static-html-output-plugin/wp2static.php(17): require_once('/var/www/mysite...')
      #6 /var/www/mysite.com/wp-settings.php(360): include_once('/var/www/mysite...')
      #7 /var/www/mysite.com/wp-config.php(91): require_once('/var/www/mysite...')
      #8 /var/www/mysite.com/wp-load.php(37): require_once('/var/www/mysite...')
      #9 /var/www/mysite.com/wp-admin/admin-ajax.php(22): require_once('/var/www/mysite...')
      #10 {main}

      The crawled page /हमसे-संपर्क-करें/ on saving as ANSI file looks like this /हमसे-संपर्क-करें/

    2. A
      In reply toabhi:
      @abhi2020-02-22 16:13:06.354Z

      Hi @Leon, I have successfully deployed the static site. Thank you :)

      ReplySolution