Hello I have always error 522 with Cloudflare and SSL
I use 2 url the first is via Cloudflare with full ssl https://example.com and second is with my ip and without Cloudflare http://XXX.XXX. If i start benchmaking mysql
with AB command (or with simple ajax request) the siteweb with Cloudflare down imediatly with error 522 but the website with my IP never down and continue to work faster
I have a free plan in Cloudflare with a auto signed SSL certificat in my server with openssl
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/apache2/ssl/s1.key -out /etc/apache2/ssl/s1.crt
I changed my.cnf for limit max_user_connections to 20 but not working i dont have error in apache and syslog
My server is a debian 7 3 cores 4gb in OVH
top
top - 07:26:58 up 15:25, 2 users, load average: 2.23, 2.28, 2.18
Tasks: 57 total, 2 running, 55 sleeping, 0 stopped, 0 zombie
%Cpu(s): 8.1 us, 1.2 sy, 0.0 ni, 88.7 id, 2.0 wa, 0.0 hi, 0.0 si, 0.0 st
KiB Mem: 4194304 total, 354532 used, 3839772 free, 0 buffers
KiB Swap: 131072 total, 0 used, 131072 free, 159668 cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
11715 mysql 20 0 585m 100m 7824 S 28.1 2.5 117:17.15 mysqld
14469 www-data 20 0 222m 12m 4312 R 2.9 0.3 0:20.86 apache2
14567 www-data 20 0 222m 11m 3604 S 2.0 0.3 0:12.89 apache2
14579 www-data 20 0 221m 11m 3612 S 2.0 0.3 0:07.69 apache2
2599 root 20 0 24364 2208 1296 S 1.0 0.1 10:53.41 htop
5317 root 20 0 24292 2184 1296 S 0.7 0.1 10:41.42 htop
14577 www-data 20 0 221m 10m 3400 S 0.7 0.3 0:08.94 apache2
1 root 20 0 10604 796 664 S 0.0 0.0 0:15.10 init
2 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kthreadd/46179
3 root 20 0 0 0 0 S 0.0 0.0 0:00.00 khelper/46179
4 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rpciod/46179/0
5 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rpciod/46179/1
6 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rpciod/46179/2
7 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rpciod/46179/3
8 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rpciod/46179/4
9 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rpciod/46179/5
10 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rpciod/46179/6
11 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rpciod/46179/7
12 root 20 0 0 0 0 S 0.0 0.0 0:00.00 nfsiod/46179
1533 root 20 0 30764 488 244 S 0.0 0.0 0:00.00 syslog-ng
1534 root 20 0 88480 3572 2480 S 0.0 0.1 0:02.10 syslog-ng
1658 messageb 20 0 29760 556 296 S 0.0 0.0 0:00.00 dbus-daemon
1676 bind 20 0 202m 22m 2324 S 0.0 0.5 0:02.13 named
1682 root 20 0 49888 1236 628 S 0.0 0.0 0:00.37 sshd
1717 root 20 0 72552 2132 524 S 0.0 0.1 0:19.69 sendmail-mta
2295 root 20 0 20844 1024 776 S 0.0 0.0 0:02.76 cron
2398 proftpd 20 0 99.7m 1944 500 S 0.0 0.0 0:09.15 proftpd
2422 root 20 0 52324 1672 1152 S 0.0 0.0 0:00.02 login
2423 root 20 0 14532 836 676 S 0.0 0.0 0:00.00 getty
2424 root 20 0 14532 832 676 S 0.0 0.0 0:00.00 getty
2425 root 20 0 14532 828 676 S 0.0 0.0 0:00.00 getty
2426 root 20 0 14532 832 676 S 0.0 0.0 0:00.00 getty
2427 root 20 0 14532 832 676 S 0.0 0.0 0:00.00 getty
2506 root 20 0 24368 1964 776 S 0.0 0.0 0:46.24 screen
2507 root 20 0 19944 2272 1672 S 0.0 0.1 0:02.25 bash
2508 root 20 0 19916 2176 1604 S 0.0 0.1 0:00.02 bash
5316 root 20 0 19916 2176 1604 S 0.0 0.1 0:00.00 bash
9522 root 20 0 220m 10m 4436 S 0.0 0.3 0:36.96 apache2
10166 root 20 0 19924 2216 1636 S 0.0 0.1 0:00.00 bash
A 522 error generally indicates something blocking requests from our IPs on your server or hosting provider.
Additional troubleshooting tips for a 522 error and CloudFlare.