Error 521: Web server is down

I have shut down and rebooted my server but I cant access my website due to this error, can anyone help me out?

7 Replies

What did you try so far to debug the issue? Does SSH or LISH work?

Your Linode is powered on but your Apache server doesn't appear to be running.

$ tcping 80,443
. . . port 80,443 closed.
. . .

If this is an Apache problem how do i restart it?

also what console would i use?

This appears to be a Cloudflare error as Error 521 occurs because the origin web server refuses a connection from Cloudflare. Have you reached out to Cloudflare yet about this issue?

Common causes:

The web server is offline

The origin web server process (e.g., Apache or Nginx) might not be running or has crashed. Review the server's error logs to see what is causing the error.

Cloudflare requests are blocked

The origin web server or hosting provider's network might be blocking Cloudflare's requests. As a reverse proxy, Cloudflare connects to your server from a Cloudflare IP and all subsequent traffic comes exclusively from a smaller set of Cloudflare IPs. As a result, certain server-side security solutions might mistake the increase in legitimate connections from this smaller set of IPs as an attack. This results in >some Cloudflare IPs being blocked or rate-limited.

To resolve this issue, whitelist all Cloudflare IP ranges in your server's firewall or any other security software at the origin.

Additional details and troubleshooting steps can be found at the following link

Hi I've solved the Error 521 problem but now im getting this,

Warning: mysqli_real_connect(): (HY000/2002): Connection refused in /var/www/html/wp-includes/wp-db.php on line 1531

Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /var/www/html/wp-includes/wp-db.php on line 1562

Warning: mysql_connect(): Connection refused in /var/www/html/wp-includes/wp-db.php on line 1562
Error establishing a database connection
This either means that the username and password information in your wp-config.php file is incorrect or we can’t contact the database server at localhost. This could mean your host’s database server is down.

Are you sure you have the correct username and password?
Are you sure that you have typed the correct hostname?
Are you sure that the database server is running?
If you’re unsure what these terms mean you should probably contact your host. If you still need help you can always visit the WordPress Support Forums.

From when i am trying to connect to my website

@bpsukltd Glad you got it figured out! Since your post was reproduced in the Community Question titled "Failed to start mysqld.service: Unit not found.", I've copied my response over here in case it's helpful to anyone.

It looks like your issue would have been solved by addressing the mysql service rather than mysqld like so:

systemctl start mysql

Or, if you're running MariaDB on CentOS7:

systemctl start mariadb.service

Any more elaboration on the fix would help others out, so feel free to add to this if there were other issues involved.


Please enter an answer

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct