Results 1 to 17 of 17
  1. #1
    Join Date
    Nov 2011
    Location
    Calgary, Alberta, Canada
    Posts
    699

    Question CloudFlare Keeps Giving Error 522

    Here's the problem: I have a website that is hosted with CrocWeb and it is optimized with CloudFlare. The website has a blog which is running WordPress v4.1 (latest version) and everything loads as it should except for one JavaScript file (which is needed to create posts). The JavaScript file in question is https://website.com/blog/wp-includes.../plugin.min.js. When I load the file directly from the server (without going through CloudFlare), it loads fine. However, loading it through CloudFlare gives error 522 (meaning the server took too long to respond?). Now, if I load https://website.com/blog/wp-includes...view/plugin.js (the un-minified version), it loads fine through CloudFlare.

    I have looked at htaccess rules on the server and couldn't find anything that would cause this. I looked at the page rules and didn't see anything wrong there either. I should note that I'm using Flexible SSL with CloudFlare so the requests being made to the CrocWeb server are with HTTP, but I don't see how that would be a problem with this file but none of the others.

    I have setup a page rule on CloudFlare so https://website.com/blog/wp-includes.../plugin.min.js redirects to https://website.com/blog/wp-includes...view/plugin.js so I can add posts. I haven't contacted CrocWeb or CloudFlare yet (cause I'm not sure who the problem would be with). I'm hoping someone might be able to help me figure out or tell me what's going on.
    Little Apps
    Open Source Software

  2. #2
    Join Date
    Jul 2013
    Location
    Indonesia from UK England
    Posts
    314
    Ask your host to remove you from there cloudflare setting and use cloudflare directly by signing up with cloudflare and doing it manual through cloudflare.com. Hope that helps

  3. #3
    Join Date
    Nov 2011
    Location
    Calgary, Alberta, Canada
    Posts
    699
    Quote Originally Posted by hostingandvps View Post
    Ask your host to remove you from there cloudflare setting and use cloudflare directly by signing up with cloudflare and doing it manual through cloudflare.com. Hope that helps
    That's how its setup already, as the SSL certificate from CloudFlare seems to only work if you have the nameservers set to CloudFlare's.
    Little Apps
    Open Source Software

  4. #4
    Have you opened tickets with Crocweb/Cloudflare? I have no experience with Crocweb but Cloudflare has been really good about solving issues I've had even if it takes a few days for them to get back to you.

  5. #5
    The 522 Error occurs when the TCP request times out before a response is received from the server where your website is hosted. Specifically, it happens when cloudFlare send out 3 SYN packets but don't receive a SYN-ACK within 15 seconds. This might indicate that the server is overloaded - a program or cron job might be taking up more resources than it should, and so the server is not able to respond to all requests consistently.

    You should contact your hosting provider to see if they can help find the cause in your webserver 522 error, and since they use cageFS with cloudLinux to isolate your account I think it not the server overload but just your account hits his CPU or RAM limit and doesn't respond.

    It may also be that the error you get occurs if CloudFlare IPs are being blocked or throttled from the webserver/host environment. Can you verify with your web host that Cloudflare IP ranges are whitelisted from your webserver?

    Here is what I recommend in order to ensure CloudFlare's IPs are accepted by your server:

    1. Ensure that you're not blocking CloudFlare IPs in .htaccess, iptables , or your firewall.
    2. Make sure your hosting provider isn't rate limiting or blocking IP requests from the CloudFlare IPs and ask them to whitelist the IP addresses below:
    3. Make sure that you're operating off of the most recent versions of Bad Behavior or mod_security. mod_security's core rules aren't blocking CloudFlare requests

    Here is a list of cloydflare IPs: https://www.cloudflare.com/ips

    Hope that helps.
    ▄▀▄ HostGarou.com » Fastest, Secure, Reliable & Affordable SSD Hosting.
    ▄▀▄ SSD Hosting (300x Faster Performance)| Domain Names | SSL Certificates.
    ▄▀▄ Hébergement Web Maroc | LiteSpeed Web Server | CloudLinux | cPanel | MariaDB
    ▄▀▄ 99.9% Uptime Guarantee | 30 Day Money Back Guarantee | 24/7 Support.

  6. #6
    Join Date
    Nov 2011
    Location
    Calgary, Alberta, Canada
    Posts
    699
    Just an update... I'm still having the problem. For a few hours there it started working again (without the rewrite rule) but then it went back to returning error 522. I've contacted both CrocWeb and CloudFlare and they both seem to be pointing their fingers at each other.
    Little Apps
    Open Source Software

  7. #7
    Join Date
    Aug 2009
    Location
    Montreal
    Posts
    1,697
    Quote Originally Posted by LittleApps-Nick View Post
    Just an update... I'm still having the problem. For a few hours there it started working again (without the rewrite rule) but then it went back to returning error 522. I've contacted both CrocWeb and CloudFlare and they both seem to be pointing their fingers at each other.
    Hello,

    What is your ticket ID with us? I would like to have a look at it.
    CrocWeb Cloud - High Availability Cloud Website Hosting
    > NVMe Storage, LSCache, Redis, Global CDN, Unlimited SSL
    > Triple Data Replication, Automated Server Failover
    > Bad Bots, Malware, DDoS Protection

  8. #8
    Join Date
    Nov 2011
    Location
    Calgary, Alberta, Canada
    Posts
    699
    Quote Originally Posted by CrocWeb View Post
    Hello,

    What is your ticket ID with us? I would like to have a look at it.
    I've messaged you with the ticket information.
    Little Apps
    Open Source Software

  9. #9

    Thumbs up Use the Bypass subdomain

    Hi

    When I had problems with Cloudlfare e.g long wait times or errors or just cached pages being returned to my own BOT when I needed fresh content I used my bypass domain which should have been set when you did your DNS.

    something like rob.mysite.com or bypass.mysite.com

    This bypasses all cloudflares rules and Threat Panel rules and hopefully shouldn't be a word too easy that would allow spammers to guess and use.

    It worked for me when I needed my BOT on my PC to tell me when a certain post had gone online 100%.

    Also if the JS file doesn't change often can you not make a copy of it and host it yourself?

    I found doing this with the old google analytics script helped a lot as analysing my JS errors with an override of the onerror function that logged each error to a file through AJAX showed this was responsible for the majority of my errors.

    So unless the code doesn't change you could take a minified version and have it on your server. If it's still slow to load then it cannot be CloudFlares fault, either your servers or a call being made in the script to somewhere else.

    Hope this helps

  10. #10
    Join Date
    Nov 2002
    Location
    WebHostingTalk
    Posts
    8,901
    Quote Originally Posted by LittleApps-Nick View Post
    Just an update... I'm still having the problem. For a few hours there it started working again (without the rewrite rule) but then it went back to returning error 522. I've contacted both CrocWeb and CloudFlare and they both seem to be pointing their fingers at each other.
    Yeah, I am stuck in this same situation with CloudFlare and Arvixe. Arvixe says everything is running correctly (and points me to their server URL where my website loads fine) and then CloudFlare tells me it's an error condition coming from Arxive's server. Literally stuck in the middle and neither party will talk to each other, I'm the middle man and am literally powerless.

    The only peculiarity on my issue, this only happens to traffic sourcing from Amazon's networks.

    If I can ever get out the monkey-in-the-middle scenario I am in with CloudFlare and Arvixe and get a solution, I'll let you know.

    Sirius
    I support the Human Rights Campaign!
    Moving to the Tampa, Florida area? Check out life in the suburbs in Trinity, Florida.

  11. #11
    Join Date
    Aug 2009
    Location
    Montreal
    Posts
    1,697
    Quote Originally Posted by sirius View Post
    Yeah, I am stuck in this same situation with CloudFlare and Arvixe. Arvixe says everything is running correctly (and points me to their server URL where my website loads fine) and then CloudFlare tells me it's an error condition coming from Arxive's server. Literally stuck in the middle and neither party will talk to each other, I'm the middle man and am literally powerless.

    The only peculiarity on my issue, this only happens to traffic sourcing from Amazon's networks.

    If I can ever get out the monkey-in-the-middle scenario I am in with CloudFlare and Arvixe and get a solution, I'll let you know.

    Sirius
    I believe Nick's issue was resolved, if not please get in touch with us.

    Sirius, I would recommend contacting Arvixe and have them whitelist CloudFlare IPs:
    https://www.cloudflare.com/ips
    CrocWeb Cloud - High Availability Cloud Website Hosting
    > NVMe Storage, LSCache, Redis, Global CDN, Unlimited SSL
    > Triple Data Replication, Automated Server Failover
    > Bad Bots, Malware, DDoS Protection

  12. #12
    Join Date
    Apr 2002
    Location
    Las Vegas, Nevada
    Posts
    510
    Quote Originally Posted by CrocWeb View Post
    I believe Nick's issue was resolved, if not please get in touch with us.

    Sirius, I would recommend contacting Arvixe and have them whitelist CloudFlare IPs:
    https://www.cloudflare.com/ips
    We had the same issue with one of our clients / Whitelisting CF's IP's in our firewall did the trick...

    Dave

  13. #13
    Join Date
    Jan 2014
    Posts
    79
    Hello ,

    Disable Rocket Loader Option in Cloudflare Control Panel and everything Gets Fine.

    Cheers !!

  14. #14
    Join Date
    Nov 2011
    Location
    Calgary, Alberta, Canada
    Posts
    699
    Quote Originally Posted by ihostex View Post
    Hello ,

    Disable Rocket Loader Option in Cloudflare Control Panel and everything Gets Fine.

    Cheers !!
    Rocket loader was disabled.

    Just a note that it appears it's working again and not giving error 522. If it happens again, then I'll just take off CloudFlare and just use CrocWeb.
    Little Apps
    Open Source Software

  15. #15
    Quote Originally Posted by sirius View Post
    Yeah, I am stuck in this same situation with CloudFlare and Arvixe. Arvixe says everything is running correctly (and points me to their server URL where my website loads fine) and then CloudFlare tells me it's an error condition coming from Arxive's server. Literally stuck in the middle and neither party will talk to each other, I'm the middle man and am literally powerless.

    The only peculiarity on my issue, this only happens to traffic sourcing from Amazon's networks.

    If I can ever get out the monkey-in-the-middle scenario I am in with CloudFlare and Arvixe and get a solution, I'll let you know.

    Sirius
    Hello,

    Sorry to hear that, Can you let me know your Ticket ID? You can post it here or PM it to me.

    Best Regards,
    Quality Assurance | Arvixe, LLC.
    QA@Arvixe.com

  16. #16
    Yep, I had cloudflare issues (can't recall the exact error code, but it sounds similar). Just adding the CLoudflare IP's to the CSF firewall did the trick.
    ██ The Webmaster - Hosting News, Reviews, Hosting & WordPress Tutorials, and Hosting Guides

  17. #17
    Join Date
    Nov 2002
    Location
    WebHostingTalk
    Posts
    8,901
    Quote Originally Posted by QA-Arvixe View Post
    Hello,

    Sorry to hear that, Can you let me know your Ticket ID? You can post it here or PM it to me.

    Best Regards,
    Sure, #BYN-213-99181.
    I support the Human Rights Campaign!
    Moving to the Tampa, Florida area? Check out life in the suburbs in Trinity, Florida.

Similar Threads

  1. Upload giving HTTP error
    By ashras99 in forum Programming Discussion
    Replies: 2
    Last Post: 03-21-2014, 07:18 AM
  2. PHP keeps giving a MySQL unavailable error
    By Looie in forum Programming Discussion
    Replies: 4
    Last Post: 08-05-2013, 07:12 PM
  3. Replies: 10
    Last Post: 03-02-2013, 08:50 PM
  4. server giving 505 error...help?
    By kshazad86 in forum Hosting Security and Technology
    Replies: 2
    Last Post: 04-12-2011, 09:15 AM
  5. named giving error
    By vpsfusion in forum Hosting Security and Technology
    Replies: 11
    Last Post: 11-06-2004, 07:18 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •