Error 520 Cloudflare

Ajie

Member
Dear All,

I'm experiencing 520 error with Cloudflare and I have no idea what's is going on.
My VPS seems online and working but sometimes I get 520 error and sometimes it get back online.
Is this something to do with Mailwizz?

I asked Cloudflare support and their response is:

Thank you for contacting Cloudflare Support. Sorry to hear that you are experiencing some difficulties here.

A 520 error happens when your origin returns a response that is unexpected. It is a general catch all failure message for a few different errors.

There are three key instances where this can happen our experience:

  1. Your web server or networking equipment (Firewall, Load Balancer) reset the TCP connection after it was established. Sometimes when a web server crashes it will reset the connection. Check your web server error log or intermediary devices like a firewall/load balancer at the timestamp that the error occurred in and look for any error messages that may suggest a TCP reset.

  2. Your web server returned an invalid response that exceeded our limits. Often this can happen if your web server is returning too many/too large headers. This is often caused by runaway scripts that return too many cookies, for example. The Code Igniter PHP framework has some known bugs around this too.

  3. Your origin is returning an 'empty response', when it is being queried.
I really have no idea what to do.
Any support will be much appreciated

Thanks,
Ajie
 
Did you check server logs as suggested in 1.?

Whats your server specs? I never saw this before but it could be that your server "power" during sending is too low and errors are related to your server being unable to answer the request.

I saw a similar case but I don't remember the error there where a friend used MW on cheapest digitalocean VPS with 1Gb ram and server just couldnt handle it. Everything was ok asap he upgraded.

PS: dont use digitalocean for server with mw they are too expensive :)
 
Did you check server logs as suggested in 1.?

Whats your server specs? I never saw this before but it could be that your server "power" during sending is too low and errors are related to your server being unable to answer the request.

I saw a similar case but I don't remember the error there where a friend used MW on cheapest digitalocean VPS with 1Gb ram and server just couldnt handle it. Everything was ok asap he upgraded.

PS: dont use digitalocean for server with mw they are too expensive :)
I did check the server logs but I can't find something significant.

Here's my server specs:
Six Cores CPU
24GB RAM
600 GB SSD
CentOS 7 64bit
100 Mbit/s port

I contacted my host and they said it has no problem whatsoever which is confusing me..
Anyway, I've sent more than 3k campaigns with this server, maybe I need to reinstall, too much I guess.
 
@sharif Please kindly check attached files.

ssh login with root password and run the following command:
-----------------------------------------
echo 'if $programname == "systemd" and ($msg contains "Starting Session" or $msg contains "Started Session" or $msg contains "Created slice" or $msg contains "Starting user-" or $msg contains "Starting User Slice of" or $msg contains "Removed session" or $msg contains "Removed slice User Slice of" or $msg contains "Stopping User Slice of") then stop' >/etc/rsyslog.d/ignore-systemd-session-slice.conf

---------------------------------------
Then restart the rsyslog service run the following command:
-----------------
systemctl restart rsyslog
------------------------
i think it will work , if not working provide log file.
Thanks
 
ssh login with root password and run the following command:
-----------------------------------------
echo 'if $programname == "systemd" and ($msg contains "Starting Session" or $msg contains "Started Session" or $msg contains "Created slice" or $msg contains "Starting user-" or $msg contains "Starting User Slice of" or $msg contains "Removed session" or $msg contains "Removed slice User Slice of" or $msg contains "Stopping User Slice of") then stop' >/etc/rsyslog.d/ignore-systemd-session-slice.conf

---------------------------------------
Then restart the rsyslog service run the following command:
-----------------
systemctl restart rsyslog
------------------------
i think it will work , if not working provide log file.
Thanks
Hi @sharif the problem seems like gone by itself about 12hrs ago, but I applied your fix anyway to prevent these things happened again.

Anyway, maybe can you explain what happened to my server regarding the logs before?

Thank you so much for your help!
 
Last edited:
Back
Top