Error 520 при входе на сайт что значит

от admin

Cloudflare Error 520: How to Troubleshoot and Fix It

As a website owner, you need to ensure that your site runs properly at all times. However, as visitors try to access its content, they may come across the message that reads “Error 520: Web Server Is Returning an Unknown Error.”

It’s a catch-all response issued by Cloudflare to indicate your website did something unexpected, resulting in an empty response. It may occur due to several factors ‒ from web server configuration to an invalid HTTP response.

This article will discuss several possible reasons behind this Cloudflare error variation. In addition, you will learn seven ways to troubleshoot the issue.

What Causes the Cloudflare Error 520?

The Cloudflare error 520 happens when the web server receives an invalid or incorrectly interpreted request, prompting an empty response. As a result, the accessed website loads the “Web server is returning an unknown error” message.

The Error 520: Web server is returning an unknown error message.

The following are several common reasons why this error occurred:

  • Crash at the origin web server. It may occur either because the origin server is running a resource-intensive script or didn’t interpret requests properly. Consequently, the server is unable to complete these requests.
  • The origin server doesn’t allow connections with any Cloudflare IP addresses. Your firewall settings may be blocking non-whitelisted IP addresses. Check whether Cloudflare’s IP address is not one of them.
  • Short idle timeouts. The TCP (Transmission Control Protocol) establishes a connection between client and server, allowing them to exchange data. By default, the web server idle timeout value is 300 seconds. Therefore, a TCP timeout value of less than 300 seconds can cause the 520 error.
  • Cloudflare-incompatible response headers. HTTP headers allow a web server and a client to communicate. They contain details such as the client browser, the page requested, and cookies. Too many cookies, for example, will result in larger header size. If it exceeds Cloudflare’s request header size limit of 16 KB, it will lead to invalid or missing response headers.

7 Ways to Troubleshoot Cloudflare Error 520: Web Server Is Returning an Unknown Error

Now that you have learned the potential causes of the Cloudflare 520 Error, let’s look at ways to fix them.

Important! Check if your site is down for everyone using the Uptrends Website Uptime Test and ensure that Cloudflare’s system status is working properly.

1. Ensure Cloudflare DNS Records Are Correct

DNS records play an integral role in the effective functioning of a website, providing information such as what IP corresponds to a certain domain name.

Incorrect DNS records can lead to an empty or unexpected response from the origin web server. Access your domain’s DNS zone editor to find your domain’s IP address. Then, log in to your Cloudflare dashboard to recheck if your DNS records are set up correctly.

2. Check Headers and Cookies

The overall limit of Cloudflare’s request headers is 32 KB, with an individual header size limit of 16 KB. If the headers exceed the limit, the 520 error response may occur. Access your server’s HAR (HTTP Archive) to review the site’s headers and cookies.

HAR files essentially record all web browser requests, including request and response headers, body content, and page load time. Generating HAR files can help you narrow down the error cause and find a solution.

Here’s how to create a HAR file using Google Chrome:

  1. Right click the web page where the error 520 is displayed and click on Inspect to open the developer tools.
  2. Click on the Network tab.
  3. Click on the small round button if it’s gray.
  1. Check the Preserve log box.

Refresh the page and reopen the network tab.

  1. Right click anywhere on the developer tools window.
  2. Select Save all as HAR with Content.
  3. To examine the file, use an online tool such as Google’s HAR Analyzer.

Important! HAR files contain sensitive information. Use a text editor to remove details such as your passwords, cookies, and other personal data before sharing the file with others.

If you find that the excessive use of cookies or cookies that are too large are causing the error 520, consider using a cookie-free domain.

3. Disable .htaccess

The .htaccess (hypertext access) file is a configuration resource for Apache-hosted sites. Disabling .htaccess can help confirm if the file was corrupted or caused bad redirects.

Suggested Reading

Open the Apache configuration file and change the AllowOverride directive to None.

Doing so will disable all .htaccess files. If you need to modify your Apache configuration, remember to save the file and restart Apache.

4. Investigate Error Logs

Error messages typically offer little information about how to resolve them. Therefore, error logs exist to help identify their source and quickly troubleshoot them. Finding the error log varies depending on where your site is hosted.

If you use Hostinger, enable PHP error logging via hPanel:

  1. Navigate to the Advanced tab and select PHP Configuration.
  2. In the PHP options tab, tick the logErrors checkbox.
  1. Scroll down to the end of the page and click Save.

Your error_log file will be located in the home/[username]/.logs directory, accessible via the File Manager.

The error_log file presents information such as the date and type of error that occurred. It also details which files and lines require fixes.

If your website is hosted somewhere else, check our comprehensive tutorial on how to check error logs.

5. Use a cURL Command

A client URL or cURL command is used for sending HTTP/HTTPS requests but can also help troubleshoot HTTP error responses.

Suggested Reading

For example, use the following cURL command to obtain information about HTTP response and request headers.

Windows 7 and 8 users need to download the cURL executable wizard to use it. If you use Windows 10, it lets you execute cURL directly from the command prompt.

6. Disable Cloudflare

Disable Cloudflare by accessing your Cloudflare dashboard and clicking on the DNS tab. Choose a domain, then toggle the Proxy status button.

Alternatively, temporarily pause Cloudflare. Pausing your account blocks traffic from going through Cloudflare’s network, revealing the IP address of your origin server.

  1. Log into your Cloudflare account and go to the dashboard’s Overview tab.
  2. Scroll down until you see Advanced Actions.
  3. Click Pause Cloudflare on Site and confirm the request.

Keep in mind that pausing Cloudflare disables its security and protection features. Thus, Cloudflare recommends going into the Development Mode to bypass caching. It allows you to see changes to your origin server in real-time.

Go to the Caching tab in your Cloudflare dashboard. Choose Configuration and scroll down the page until you reach the toggle icon to turn on the Development Mode.

7. Contact Cloudflare Support

If you need further assistance, reach out to the Cloudflare support team by filing a support ticket. Typically, you will need to send the URL information, the Cloudflare Ray ID, and HAR files of when Cloudflare was enabled and temporarily disabled.

Troubleshooting Other Cloudflare Errors

In many cases, HTTP error code variations commonly signal a server issue, which can be either a proxy server or the origin host. Website owners are likely to encounter 5xx server errors at some point. Thus, it is important to be aware of such errors and learn how to fix them right away.

Here are some immediate fix ideas for common 5xx error responses:

  • Verify that Cloudflare IPs are not blocked in .htaccess, iptables, or your firewall.
  • Ask your host provider whether they restrict or block Cloudflare IPs requests. If they do, request for the IP addresses to be whitelisted.
  • Check if your origin web server is up and running normally. If it is not, review the error logs to pinpoint the issue. Contact your hosting provider if you are unsure how to complete these steps.
  • Ask your hosting provider or site administrator to confirm whether the infrastructure is experiencing any load issues.
Troubleshooting Other Errors

Conclusion

The error 520: web server is returning an unknown error may not only affect user experience but also prevent you from logging in to your site’s dashboard.

Therefore, you need to find out ways to fix it right away. In this article, we listed seven methods to fix an error 520:

  1. Ensure Cloudflare DNS records are correct.
  2. Check headers and cookies.
  3. Disable .htaccess.
  4. Investigate error logs.
  5. Use a cURL command.
  6. Disable Cloudflare.
  7. Contact Cloudflare support.

We hope this guide helps you resolve the Cloudflare 520 error response. If you have further questions, feel free to leave them in the comment section below.

Rizma uses writing as a way to share what she has discovered with others. As an expert in web hosting, she enjoys using her knowledge to help others. In her free time, she loves watching her favorite films or curating playlists for her loved ones.

How to Fix Cloudflare Error 520: Web Server is Returning an Unknown Error

Jake Sacino February 15, 2021 February 15, 2021

When your Cloudflare server receives an invalid connection request so bungled that it can’t even classify the issue, it returns the annoyingly vague Error 520: Web Server Is Returning An Unknown Error.

Cloudflare Error 520 1

No time to spare? Click here to jump to straight to how to fix this error.

What is Cloudflare Error 520: Web Server is Returning An Unknown Error?

Cloudflare Error 520 is a server-side diagnostic message indicating that even though a request reached the origin web server, the server received an invalid HTTP response or didn’t know how to interpret the request at all and was unable to proceed.

The most common causes for this are either a program or system task that was running out of resources and needed to be terminated, or the server was overloaded.

How To Fix Cloudflare Error 520: Web Server is Returning an Unknown Error

  1. Search Error Logs For Device Resets
  2. Restart PHP Applications On Your Origin Server
  3. Whitelist Your Cloudflare Origin Server IP Address
  4. Check Response Headers From Your Cloudflare Origin Web Server
  5. Lighten Your Cookie Load
  6. Correct Your Cloudflare Origin Server DNS Settings
  7. Examine Your Server Traffic
  8. Check For Non-HTTP Errors In Your Cloudflare Logs

1. Search Error Logs For Device Resets

If the origin web server or any of your networking equipment is updated or reset after a successful TCP handshake, headers from that connection will be out of date and the server won’t know how to handle further requests.

Typically, error 520 quickly clears on its own after the visitor refreshes the page.

This means if your users are regularly seeing the 520 error status code, it might mean that one of your devices is resetting unexpectedly.

Your Cloudflare origin web server logs can show you each instance of error 520 and different connection resets.

You can compare this data to the uptime listed in your firewall, load balancer, origin server, or other network hardware.

If this is the issue, reconfigure your device’s update or reboot schedule to coincide with your routine maintenance times.

Restart your Cloudflare origin server with this new schedule to force any existing sessions to reconnect.

2. Restart PHP Applications On Your Origin Server

While you’re checking out your origin web server error logs, you can also find out whether any of your PHP applications are crashing or overconsuming system resources.

Since your PHP applications may support critical services on your site from the application layer, users may encounter error 520 when applications at this OSI layer crash even though there’s a connected session in progress.

Restarting the affected application should clear the 520 error.

Services that are always online are more prone to overloading and crashing, so an important preventative measure is to schedule reboots during a routine maintenance period.

You can create a cron job to automatically perform these reboots to prevent always-online services from becoming overloaded and avoid issues with error 520.

3. Whitelist Your Cloudflare Origin Server IP Address

As a part of Cloudflare’s built-in security protocols, you have to whitelist your origin web server IP addresses in your Cloudflare dashboard.

Sometimes Cloudflare returns a more descriptive error code when an IP address is explicitly blocked.

But if a connection isn’t whitelisted at all and can’t be identified, the server won’t know how to handle it and throws the 520 error.

All you have to do is correct your A records to whitelist the appropriate IP addresses.

Be sure that your CNAME records are accurate and that all CNAMEs associated with your web server are whitelisted in your DNS settings, otherwise you may encounter error 520 or similar error messages.

4. Check Response Headers From Your Cloudflare Origin Web Server

Missing response headers and empty response headers coming from your Cloudflare server are common causes of the 520 error.

Check your origin response headers in your Cloudflare server’s HAR (HTTP Archive) files.

You can use this guide to find & access your HAR files (note that these may contain sensitive data).

Missing response headers can come from many different sources.

Use a debugger like Wireshark or Fiddler to debug further as these tools can attempt to trace requests and the data that makes them up.

If you see a response from an outdated user agent (web browser) it may be a signal that the connection is coming from an old version of Internet Explorer or Safari.

Make sure your site is compatible with common web browsers, although fringe user agent connections will sometimes appear no matter what.

5. Lighten Your Cookie Load

The more complex your web service, the more cookies you might be relying on to handle requests efficiently.

The problem is cookies increase the HTTP response header size attached to the request they’re sent over, and Cloudflare’s header size limit restricts headers to 8KB or less.

If you exceed Cloudflare’s header size limit, your origin web server won’t be able to parse the full connection request and will reply with a protocol violation warning or a timed-out HTTP response (due to rate-limiting rules).

You can access your server’s HAR files to review response header data to see if you’re using too many cookies (or cookies that are too big).

The HTTP archive shows you an example output of your headers

If your headers exceed the 8KB host HTTP header limit, you’ll need to work with your web developer to optimize your cookies.

6. Correct Your Cloudflare Origin Server DNS Settings

If you’re receiving an empty response from your web server, it means that your site doesn’t have any HTTP status code information or response body data.

This often indicates your web server configuration for your hosting provider is incorrect or outdated.

Contacting your hosting provider is the easiest way to determine whether you have the right DNS information.

Be aware that your corrected Cloudflare DNS settings can take up to 72 hours to propagate throughout your site depending on your hosting provider, especially if they must escalate a support ticket to do so.

Your host provider may have to flush your DNS cache on their end, which can lengthen this wait.

If missing or invalid HTTP response headers are the result of DNS errors, prepare your team and your users for your site to experience outages for up to 3 days.

Don’t forget to clear your site’s cache after updating any DNS settings. This also means clearing the DNS cache and the cache of any WordPress plugins installed on your site.

7. Examine Your Server Traffic

First, check for unusual traffic on your server.

Ensure you’re filtering requests on port 80 to restrict suspicious traffic and blocking spammy connections since this kind of overload can cause issues like errors 520 or 503.

If you see chunks of the same IP address and ray ID in a short period of time, block these connections.

Cloudflare proxied traffic must be whitelisted, so make sure to check your error log for any blocked connections from proxy IP addresses you want to permit.

If permitted traffic on port 80 has valid headers but it takes too long to receive a response from the origin server, you may experience a timeout unrelated to rate-limiting settings on your server.

Unexpected timeouts can result in error message 520, and you can turn to your HAR records again to see if any requests contain bulky or corrupted response bodies.

8. Check For Non-HTTP Errors In Your Cloudflare Logs

Error 520 is essentially a catch-all response for situations where your server can’t even recognize an incoming request.

Since every common HTTP issue has its own error code, you’ll often see error 520 when non-HTTP errors are preventing a successful server connection or causing a gateway timeout error.

Review your system resources and your network hardware for any stalled or crashed services.

You can look up the search term “520” to try and locate the Cloudflare response code in a given device’s error logs.

Читать:
Как выделить несколько объектов

If you’re still seeing error 520 after reviewing all of your devices and your traffic, open a support ticket with Cloudflare and your hosting provider to see if any errors appear on their end.

If you’re looking for (free) tips to optimize your site speed with Cloudflare and rank higher on Google , you can follow me on Twitter ���� @bitofseo.

Please DM me if you have any questions about this Cloudflare article (or have some feedback to make it better ��️).

About Jake Sacino

After working as an engineer and consultant for a bunch of big companies, Jake now works as a full-time SEO & software engineer.

Что значит код ошибки 520

Ошибка 502 Bad Gateway возникает при неправильной работе прокси-сервера, DNS-сервера и чаще всего сервера, на котором размещён сайт. Проблема может распространяться как на весь ресурс, так и на отдельные страницы.

Что такое плохой шлюз?

Это сообщение об ошибке означает, что сервер-источник отправил неверный ответ другому серверу, который выступает как шлюз или прокси. Поскольку все запросы в веб перенаправляются через множество шлюзов, может быть очень сложно определить точное место, где возникли сложности.

Что делать если пишет плохой шлюз?

Исправляем ошибку «502 Плохой шлюз» от пользователя

Если ошибка не наблюдается, то проблемы с вашей стороны. Для начала сделайте следующее: Перезапустите страничку через CTRL+F5. Очистите браузер от кэша, cookie и историю просмотров: «выполните комбинацию CTRL+H» — «пункт Очистить историю».

Что такое плохой шлюз Ошибка 502?

Просматривая сайты во всемирной сети Интернет, пользователи могут столкнуться с таким явлением, как «ошибка 502 Bad Gateway». Появление такой информации на вашем экране означает, что браузер, с помощью которого вы выходите в интернет, получил недопустимый ответ от сервера, которому он адресовал запрос. .

Что делать при ошибке 500 502 503 520 521 522 523 524 525 526 527 CloudFlare в CinemaPress?

Что за ошибка 502 Bad Gateway nginx?

Если возникает ошибка 502 Bad Gateway, значит HTTP-запросы от браузера до вашего хотсинга идут через какой-то шлюз. . 502-ая ошибка означает, что запрос от клиента обработал сервис nginx и передал Apache серверу, а веб-сервер Apache не смог его обработать, о чем и сообщил nginx’у.

Что значит ошибка неверного шлюза?

Выражение «ошибка 502 bad gateway» можно перевести как «неверный шлюз». Это будет означать, что браузер (обозреватель Интернета) на вашем компьютере при запросе какой-либо информации с веб-узла получил неприемлемый ответ от другого сервера (DNS или прокси-сервера).

Что значит ошибка 502 в ютубе?

Ошибка означает, что один из серверов google отвалился и поэтому google не может вам отправить нормальную страницу. . Как и написано на картинке, надо немного подождать и попробовать снова.

Что делать если выбивает ошибка 502?

  1. Обновите страницу
  2. Очистите кэш браузера
  3. Попробуйте другой браузер
  4. Очистите кэш DNS.
  5. Проверьте на другом устройстве
  6. Проверьте журнал ошибок
  7. Проверьте плагины
  8. Проверьте сети CDN.

Как перевести Bad Gateway?

Перевод фразы «bad gateway» с английского на русский.

Сервер в роли шлюза или прокси получил сообщение о неудачном выполнении промежуточной операции.

Что означает ошибка 520?

Ошибка 520 (Web server is returning an unknown error)

Если Cloudflare не удается обработать ответ сервера, на котором размещен сайт, то он выдает эту ошибку. Разрыв соединения, когда запрос к серверу был успешным. . Ответ сервера некорректен.

Что такое код ошибки 505?

Ошибка 505 появляется при использовании неподдерживаемой браузером версии HTTP. Заражение вирусом, который получил контроль над браузером или исходящим трафиком. Использование устаревшего браузера, не поддерживающего современные версии HTTP.

Что значит код ошибки 504?

504 Gateway Timeout — означает, что веб-сервер не смог в установленный лимит времени вернуть необходимый HTTP-ответ. Возможные причины возникновения 504 ошибки: Резкий скачек нагрузки на сайте, когда сервер не успевает отвечать на все входящие запросы.

Что значит nginx 1.16 1?

Nginx 1.16.1 — веб-сервер и почтовый прокси-сервер, функционирующий на операционных системах, основной которой является UNIX (FreeBSD, OpenBSD, Linux и другие). . Является быстрым, надежным и простым сервером, где нет ничего лишнего.

Что означает код ошибки 500?

Код ответа сервера 500 Internal Server Error указывает на то, что сервер столкнулся с неожиданной ошибкой, которая помешала ему выполнить запрос.

Что такое 403?

Ошибка 403 (Forbidden, доступ запрещен) может возникнуть по одной из нескольких причин: Вы выложили на сервер неправильный индексный файл. . html — это два абсолютно разных файла). Вы выставили неправильные права на папку, в которой находится запрашиваемый файл, или на какую-либо из ее родительских директорий.

Как исправить ошибку во время выполнения 520

Как правило, специалисты по ПК называют «Can’t empty Clipboard» как тип «ошибки времени выполнения». Разработчики программного обеспечения, такие как SoftwareDeveloper, обычно работают через несколько этапов отладки, чтобы предотвратить и исправить ошибки, обнаруженные в конечном продукте до выпуска программного обеспечения для общественности. К сожалению, инженеры являются людьми и часто могут делать ошибки во время тестирования, отсутствует ошибка 520.

После установки программного обеспечения может появиться сообщение об ошибке «The Clipboard was opened but could not be emptied.». После того, как об ошибке будет сообщено, Microsoft Corporation отреагирует и быстро исследует ошибки 520 проблемы. Затем Microsoft Corporation будет иметь знания, чтобы исследовать, как и где устранить проблему. Таким образом при выполнении обновления программного обеспечения Windows Operating System, он будет содержать исправление для устранения проблем, таких как ошибка 520.

Когда происходит ошибка 520?

Вполне вероятно, что при загрузке Windows Operating System вы столкнетесь с «Can’t empty Clipboard». Мы можем определить происхождение ошибок ошибки 520 во время выполнения следующим образом:

Ошибка 520 Crash — Номер ошибки вызовет блокировка системы компьютера, препятствуя использованию программы. Если данный ввод недействителен или не соответствует ожидаемому формату, Windows Operating System (или OS) завершается неудачей.

Утечка памяти «Can’t empty Clipboard» — ошибка 520 утечка памяти приводит к тому, что Windows Operating System постоянно использует все больше и больше памяти, увяская систему. Потенциальные триггеры могут быть «бесконечным циклом», или когда программа выполняет «цикл» или повторение снова и снова.

Ошибка 520 Logic Error — Логическая ошибка возникает, когда ПК производит неправильный вывод, даже когда пользователь вводит правильный вход. Это может произойти, когда исходный код Microsoft Corporation имеет уязвимость в отношении передачи данных.

Как правило, ошибки Can’t empty Clipboard вызваны повреждением или отсутствием файла связанного Windows Operating System, а иногда — заражением вредоносным ПО. Большую часть проблем, связанных с данными файлами, можно решить посредством скачивания и установки последней версии файла Microsoft Corporation. Более того, поддержание чистоты реестра и его оптимизация позволит предотвратить указание неверного пути к файлу (например Can’t empty Clipboard) и ссылок на расширения файлов. По этой причине мы рекомендуем регулярно выполнять очистку сканирования реестра.

Классические проблемы Can’t empty Clipboard

Эти проблемы Windows Operating System, связанные с Can’t empty Clipboard, включают в себя:

  • «Ошибка программного обеспечения Can’t empty Clipboard. «
  • «Недопустимая программа Win32: Can’t empty Clipboard»
  • «Can’t empty Clipboard столкнулся с проблемой и закроется. «
  • «Can’t empty Clipboard не может быть найден. «
  • «Can’t empty Clipboard не найден.»
  • «Ошибка запуска программы: Can’t empty Clipboard.»
  • «Файл Can’t empty Clipboard не запущен.»
  • «Отказ Can’t empty Clipboard.»
  • «Ошибка в пути к программному обеспечению: Can’t empty Clipboard. «

Ошибки Can’t empty Clipboard EXE возникают во время установки Windows Operating System, при запуске приложений, связанных с Can’t empty Clipboard (Windows Operating System), во время запуска или завершения работы или во время установки ОС Windows. Отслеживание того, когда и где возникает ошибка Can’t empty Clipboard, является важной информацией при устранении проблемы.

Создатели Can’t empty Clipboard Трудности

Большинство проблем Can’t empty Clipboard связаны с отсутствующим или поврежденным Can’t empty Clipboard, вирусной инфекцией или недействительными записями реестра Windows, связанными с Windows Operating System.

В частности, проблемы Can’t empty Clipboard возникают через:

  • Недопустимая (поврежденная) запись реестра Can’t empty Clipboard.
  • Зазаражение вредоносными программами повредил файл Can’t empty Clipboard.
  • Другая программа злонамеренно или по ошибке удалила файлы, связанные с Can’t empty Clipboard.
  • Другая программа, конфликтующая с Can’t empty Clipboard или другой общей ссылкой Windows Operating System.
  • Неполный или поврежденный Windows Operating System (Can’t empty Clipboard) из загрузки или установки.

Совместима с Windows 2000, XP, Vista, 7, 8, 10 и 11

[FIX] Cloudflare ‘Ошибка 523: источник недоступен’

Мотор+колёса

Некоторые пользователи сталкиваются с ошибкой 523: Origin недоступен при попытке получить доступ к определенным веб-сайтам из браузера по умолчанию. В большинстве случаев затронутые пользователи говорят, что одна и та же проблема возникает на нескольких веб-сайтах, защищенных Cloudflare.

Ошибка Cloudflare 523 Источник недоступен

После тщательного изучения этой проблемы выяснилось, что существует несколько различных причин, по которым это сообщение об ошибке может появляться в вашем браузере. Вот краткий список потенциальных виновников, которые могут быть ответственны за появление этого кода ошибки:

  • Постоянная проблема с сервером Cloudflare. Если вы видите этот код ошибки на каждом веб-сайте, защищенном Cloudflare, который вы пытаетесь посетить, возможно, у Cloudflare в настоящее время возникают проблемы с сервером, который отвечает за ваш регион. В этом случае все, что вы можете сделать, это подтвердить проблему и дождаться, пока участвующие разработчики исправят проблему с сервером на своей стороне.
  • Несогласованный DNS. Другая потенциальная причина, которая может вызвать эту ошибку, – это несогласованный DNS, назначенный вашим интернет-провайдером. Несколько затронутых пользователей, столкнувшихся с той же проблемой, подтвердили, что проблема была устранена после того, как они перенесли свой DNS в диапазон, предоставленный Google.
  • Вмешательство стороннего брандмауэра – как оказалось, чрезмерно защищающий сторонний брандмауэр также может быть ответственным за эту конкретную ошибку. Если этот сценарий применим, вы можете решить проблему, добавив в белый список порты, используемые Cloudflare, или полностью удалив избыточный антивирусный пакет.

Теперь, когда вы знаете всех потенциальных виновников, вот несколько проверенных методов, которые позволят вам выявить или исправить проблему:

Метод 2: изменение DNS по умолчанию

Если вы видите сообщение об ошибке «Ошибка 523: Origin is unreachable» на каждом веб-сайте, защищенном Cloudflare, который вы пытаетесь посетить, скорее всего, вы имеете дело с несогласованным DNS, который не позволяет вашему компьютеру обмениваться данными с хостом через Cloudflare. .

Несколько затронутых пользователей, которые столкнулись с той же проблемой с Cloudflare, сообщили, что им удалось решить проблему, изменив DNS (систему доменных имен) по умолчанию, назначенный их интернет-провайдером, на эквивалент, предоставленный Google – вы можете сделать это для IPv4 и IPv6, чтобы покрыть оба возможных сценария.

Если вы еще не пробовали это возможное исправление, приведенное ниже, следуйте приведенным ниже инструкциям, чтобы изменить DNS по умолчанию на вашем компьютере на общедоступный DNS Google:

Diagnosing 520 Errors

520 errors are CDN-specific, not web server-specific, and are a catch-all error. With Cloudflare, the most common service where we see 520 errors, this means that the web server returned an unknown error. This “I’ve no idea what’s going on” error makes it a bit of a nightmare to troubleshoot.

The bulk of this article will primarily focus on Cloudflare, but the same troubleshooting steps will likely hold true for most CDNs who are also adopting the same error codes.

That said, you may still want to Google “520 Provider Name” (for example, “520 QUIC.cloud”) though, as that may provide some more relevant troubleshooting steps.

Cloudflare’s Breakdown

Cloudflare has its own documentation for troubleshooting 5XX errors. This can be viewed here:

In the above article, they state that this can be caused by:

  • Origin web server application crashes
  • Cloudflare IPs are not allowed at your origin
  • Headers exceeding 16 KB (typically due to too many cookies)
  • An empty response from the origin web server that lacks an HTTP status code or response body
  • Missing response headers or origin web server not returning proper HTTP error responses

What We’ve Seen

Typically 520 errors are pretty rare when using Cloudflare with GridPane, and the second option can be ruled out unless you yourself have reconfigured that.

An empty response or excessively large headers (typically a lot of cookies) are the most likely culprits. Cloudflare may also have closed the connection early.

Too many cookies seem to be one of the most common issues, and the Cleantalk plugin [again] was the culprit of a recent case combined with Chrome storing these cookies for an excessive period of time. Full details can be found here in the community forum:

Troubleshooting Steps

Usually, the best option when you encounter a 520 error is to disable Cloudflare’s proxy or your CDN, but in the unlikely event that there’s an issue with

Step 1. Check Your DNS Records are Correct

It’s possible that you may be having DNS issues. Check that your DNS records are pointing to the right place.

Step 2. Check Your Site in an Incognito Window

If your site is serving a lot of cookies and your browser has cached a lot of cookies, the issue may be local to you. Check your site in incognito (even in a new browser) to see if the issue still occurs.

Step 3. Check the Cloudflare (or your CDN) Status Page

Maybe Cloudflare or your CDN is having an active incident that’s causing issues in pockets around the world. Check Cloudflare’s status page for issues here:

If issues are reported, deactivate the proxy.

If you absolutely do not want to disable Cloudflare, you can create a HAR file. See the section below.

Step 4. Check Monit

  • Are all your services up and running? (PHP, Nginx/OpenLiteSpeed, MySQL). If no, this is likely the problem – click on the service name and attempt to start/restart the service.
  • Is there high CPU and/or very high RAM usage? If yes, this is likely the problem. Our documentation on troubleshooting 502 errors and 504 errors are likely what you need to follow after first deactivating Cloudflare.

To open Monit, head to your Servers page inside your GridPane account and click the green pie chart icon next to your server:

Step 5. Deactivate Cloudflare

Ruling out Cloudflare of the cause is usually the best option. From there, if there are no further issues, you know it’s Cloudflare (or other CDN) and not your server.

If issues continue to happen, then you will get the correct server error and can troubleshoot accordingly.

Once you’ve identified and resolved the underlying issue you can turn it back on.

Step 6. Check Your Logs

With Cloudflare out of the way, any server errors will now provide insight on how to proceed.

The website error logs may also provide some legitimate website errors that could potentially be causing issues.

Check your website’s Nginx or OpenLiteSpeed error log. You can find this inside your GridPane account by heading to your Sites page and clicking on the name of the site to open up the customizer. Click through to the logs tab and you will find the error log at the bottom:

When checking the log, look for the errors that correspond to your website checks.

You can also activate WP Debug by clicking the toggle at the top of this tab, and this will install the query monitor plugin and potentially log more specific errors. More details on this can be found here:

Create a HAR File

A HAR is an HTTP archive file, and if you’re contacting Cloudflare support you will need to provide them with one (and it’s also a good idea to do the same for other CDN providers as well).

A HAR file will record all requests made by the browser, including the request & response headers (so you can confirm if your site’s headers are too large for Cloudflare). HAR files are also useful when troubleshooting issues that are difficult to replicate.

1. Create a HAR file in Chrome

1. Head over to the URL where you’re experiencing 520 errors, right-click and choose Inspect:

2. Next, click through to the Network tab. The circle in the top-left should already be red, but if it’s grey, click it. Also check the “Preserve Log” checkbox.

3. Now refresh the page. Here we want to record the page load with the error occurring.

4. Once you’ve captured that, right-click on any of the filenames in the bottom left, and choose “Save all as HAR with content“.

You’ve created your HAR file.

2. Create a HAR file in Microsoft Edge

The process for Edge is the same as Google Chrome. The screenshots in the above section are from Chrome, but you can follow them step for step in Edge too.

3. Create a HAR file in Firefox

The process is almost the same as Chrome:

  1. Head over the URL, right-click and choose Inspect.
  2. Click through to the Network tab and then reload the page
  3. Once the page has fully reloaded right-click anywhere inside the tab and choose “Save All As HAR“.

4. Create a HAR file in Safari

  1. Head over the URL, right-click and choose Inspect.
  2. Click through to the Network tab, check the “Preserve Log” checkbox (this is located on the right-hand side), and then reload the page.
  3. Once the page has fully reloaded there’s also a button on the right labeled “Export“. Click this to save your HAR file.

If 520 Errors Continue

If you’ve followed the above steps and you still see issues when you turn Cloudflare or your CDN back on, contact their support.

Похожие статьи