Results 1 to 17 of 17
-
02-18-2015, 12:37 AM #1Web Hosting Master
- Join Date
- Nov 2011
- Location
- Calgary, Alberta, Canada
- Posts
- 699
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
-
02-19-2015, 04:16 AM #2Disabled
- 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
-
02-19-2015, 01:33 PM #3Web Hosting Master
- Join Date
- Nov 2011
- Location
- Calgary, Alberta, Canada
- Posts
- 699
Little Apps
Open Source Software
-
02-20-2015, 05:16 AM #4Newbie
- Join Date
- Feb 2015
- Posts
- 7
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.
-
02-21-2015, 11:53 AM #5Junior Guru Wannabe
- Join Date
- Jul 2013
- Posts
- 41
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.
-
02-26-2015, 07:44 PM #6Web Hosting Master
- 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
-
02-26-2015, 07:52 PM #7CrocWeb 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
-
02-26-2015, 09:14 PM #8Web Hosting Master
- Join Date
- Nov 2011
- Location
- Calgary, Alberta, Canada
- Posts
- 699
Little Apps
Open Source Software
-
02-26-2015, 09:17 PM #9Newbie
- Join Date
- Feb 2015
- Posts
- 5
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
-
03-01-2015, 02:30 PM #10Retired Moderator
- Join Date
- Nov 2002
- Location
- WebHostingTalk
- Posts
- 8,901
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.
SiriusI support the Human Rights Campaign!
Moving to the Tampa, Florida area? Check out life in the suburbs in Trinity, Florida.
-
03-01-2015, 02:40 PM #11
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/ipsCrocWeb 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
-
03-01-2015, 02:45 PM #12Web Hosting Evangelist
- Join Date
- Apr 2002
- Location
- Las Vegas, Nevada
- Posts
- 510
-
03-01-2015, 10:47 PM #13Temporarily Suspended
- Join Date
- Jan 2014
- Posts
- 79
Hello ,
Disable Rocket Loader Option in Cloudflare Control Panel and everything Gets Fine.
Cheers !!
-
03-01-2015, 10:52 PM #14Web Hosting Master
- Join Date
- Nov 2011
- Location
- Calgary, Alberta, Canada
- Posts
- 699
Little Apps
Open Source Software
-
03-02-2015, 02:38 AM #15WHT Addict
- Join Date
- Apr 2012
- Posts
- 109
Quality Assurance | Arvixe, LLC.
QA@Arvixe.com
-
03-02-2015, 04:07 AM #16WHT Addict
- Join Date
- Mar 2013
- Posts
- 166
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
-
03-02-2015, 10:55 AM #17Retired Moderator
- Join Date
- Nov 2002
- Location
- WebHostingTalk
- Posts
- 8,901
I support the Human Rights Campaign!
Moving to the Tampa, Florida area? Check out life in the suburbs in Trinity, Florida.
Similar Threads
-
Upload giving HTTP error
By ashras99 in forum Programming DiscussionReplies: 2Last Post: 03-21-2014, 07:18 AM -
PHP keeps giving a MySQL unavailable error
By Looie in forum Programming DiscussionReplies: 4Last Post: 08-05-2013, 07:12 PM -
Staminus dedicated ddos protected server with cloudflare giving error
By sachbolymail in forum Dedicated ServerReplies: 10Last Post: 03-02-2013, 08:50 PM -
server giving 505 error...help?
By kshazad86 in forum Hosting Security and TechnologyReplies: 2Last Post: 04-12-2011, 09:15 AM -
named giving error
By vpsfusion in forum Hosting Security and TechnologyReplies: 11Last Post: 11-06-2004, 07:18 AM