Как и любая проблема с доступом к интернет-ресурсам, ошибка 503 Service Unavailable («Сервис недоступен») может быть вызвана сбоями как на стороне пользователя, так и на стороне сервера, на котором находится сайт. Поэтому первое, что нужно сделать, если вы столкнулись с таким сообщением при посещении веб-ресурса, попробовать устранить сбой своими силами. Это намного проще и быстрее, чем пытаться донести информацию о возникших сложностях до владельца сайта.
Процедура устранения проблемы со стороны администратора веб-ресурса более сложная, но в большинстве случаев именно неправильные настройки на уровне хостинга или настроек сайта в панели управления CMS приводят к появлению ошибки сервера с кодом 503.
Мощный хостинг в подарок при заказе лицензии 1С-Битрикс
Выбирайте надежную CMS с регулярными обновлениями системы и профессиональной поддержкой. А мы подарим вам год мощного хостинга – специально для сайтов на 1С-Битрикс.
Заказать
Устранение ошибки 503 пользователем
Возникает резонный вопрос: почему бы просто не покинуть проблемный сайт, пусть сами разбираются со своими багами? Это решение очевидное, но не совсем верное. Во-первых, вам может быть очень необходимо посетить именно этот веб-ресурс. Во-вторых, появление сигнала об ошибке доступа может говорить о том, что с вашим браузером, программным обеспечением, компьютером или другими устройствами что-то не в порядке. И тогда это уже ваша проблема, которая может повторяться систематически и при посещении других сайтов. Рассмотрим, что можно сделать самому, чтобы исправить ошибку 503, двигаясь от простого к сложному.
- Обновите вкладку браузера. Это покажется странным, но зачастую такое простое действие приводит к положительному результату. Нажмите клавишу F5 или воспользуйтесь специальной кнопкой в меню браузера.
- Закройте и откройте браузер. Таким образом вы произведете сброс текущей сессии соединения и обновите его. При новом подключении скрипт браузера может не обнаружить ошибку 503, если она была воспринята им ошибочно.
- Стоит убедиться, что сбой не связан именно с вашим компьютером. Это особенно актуально, если ошибки соединения с веб-ресурсами повторяются регулярно и возникают с разными кодировками на других сайтах. Для этого необходимо посетить проблемную страницу с другого устройства и желательно через новое интернет-соединение.
- Зайдите на страницу, выдавшую ошибку 503, используя другой браузер. Вполне вероятно, что дефект возникает из-за некорректных настроек текущего. Если это подтвердится, стоит в них покопаться и найти источник возникновения проблемы. Самое простое, это восстановить настройки по умолчанию.
- Перезагрузка компьютера. Как и любой программный сбой на уровне операционной системы или другого программного обеспечения, он может быть исправлен автоматически при новой загрузке системы.
- Очистка кэша и удаление файлов cookies. В зависимости от настроек конкретного браузера в них может сохраняться много «лишней» информации при обмене web-данными. Операция довольно несложная, но стоит предварительно посмотреть help по данному вопросу, т.к. в каждом браузере она проводится по-разному.
- Перезагрузка сетевого оборудования. Часто сложности при соединении с интернет-ресурсами возникают из-за некорректного поведения ПО на внешних устройствах, через которые вы получаете трафик. Это может быть роутер, раздающий интернет как по кабелю, так и через Wi-Fi. Необходимо отключить соответствующую железку по питанию, т.е. полностью обесточить ее примерно на одну минуту. Если провайдер выдает вам динамический ip-адрес, то произойдет его смена, что тоже может привести к устранению появления ошибки 503.
- Смена DNS-адреса на сервере. Это решение является наиболее сложным для обычного пользователя. В большинстве интернет-соединений используется общедоступный DNS-адрес Google. Изменить его можно через «Панель управления компьютера» в «Центре управления сетями и общим доступом». Данные манипуляции довольно критичны для устойчивой работы интернета на вашем компьютере. Поэтому производить их стоит только тогда, когда вы абсолютно уверены в своей IT-подготовке.
Если ни один из вышеприведенных способов не помог, а достучаться до сайта ну очень нужно, пишите о проблеме в техподдержку данного ресурса, приложив скриншот страницы с кодом и описанием ошибки.
Ошибка 503 может отображаться в разных форматах с дополнительными информативными сообщениями. Появление страницы «503 Service Temporary Unavailable – Сервис временно недоступен» говорит о том, что проблема носит временный характер. В этом случае пользователю рекомендуется не предпринимать никаких действий и просто дождаться, когда доступ восстановится автоматически.
Решение проблем с ошибкой 503 администратором веб-ресурса
При возникновении ошибки 503 Service Unavailable в любом ее проявлении администратор web-ресурса в первую очередь должен разобраться в причине ее появления. Игнорирование данной процедуры по принципу «само пройдет» может привести к тому, что сайт понесет глобальные потери в объеме пользовательского трафика и, как следствие, конверсии. Посетители, регулярно сталкивающиеся с проблемами доступа к определенному ресурсу, очень быстро занесут его в «игнор».
В зависимости от конкретного тарифного плана хостинга каждый сайт имеет ограничения по одновременной обработке запросов, поступающих на сервер от конечных пользователей. Более простые запросы браузеров обрабатываются практически мгновенно, сложные ожидают очереди в порядке их поступления. Количество отложенных запросов лимитировано, при превышении нормы каждый следующий отклоняется. В этом случае посетитель сайта видит на экране сообщение с кодировкой error 503.
Наиболее частые причины возникновения ошибки 503 на стороне сервера
- При получении запроса от пользователя конкретная страница сайта не может установить соединение с базой данных MySQL.
- Некорректная работа плагинов и расширений из-за внутренних ошибок или конфликта между собой.
- Использование недорого хостинга и маломощного сервера приводит к тому, что оборудование не справляется с обработкой входящего трафика.
- Ресурсоемкие скрипты создают дополнительную нагрузку на сервер.
- Задействован почтовый сервис, выполняющий автоматическую рассылку сообщений в большом объеме.
- Соединение с удаленным сервером может привести к замедлению обработки запросов.
- Передача файлов большого объема при помощи PHP-скрипта.
- Значительное количество нерабочих модулей конкретной CMS.
Как видим, решение практически всех проблем, приводящих к появлению ошибки 503, достигается использованием более мощных серверов и высокоскоростного качественного хостинга. Отрицательная сторона этого способа в его затратности. Распределение пользовательского трафика неравномерно по времени, и банальный апгрейд железа не поможет полностью исключить сбои в моменты пиковых нагрузок.
Как избежать появления ошибок 503
Для начала рекомендуется провести статистический анализ через административную панель (снять логи), чтобы понять, какие процессы создают максимальную нагрузку на сервер, и произвести определенные изменения в настройках.
Уменьшение нагрузки на базу данных можно добиться следующими способами:
- Регулярное обновление CMS, которое позволяет оптимизировать работу движка, уменьшить количество багов.
- Установка защиты от ботов и парсеров, которые часто запускаются вашими конкурентами, чтобы создать дополнительную нагрузку на ресурс и тем самым вывести его частично или полностью из строя.
- Уменьшение размера и, если это возможно, количества графических файлов на сайте, а также «тяжелых» таблиц.
- Ввод ограничений на количество одновременных участников в чате.
Оптимизация работы скриптов
- Отключите все лишние плагины и дополнения, кроме тех, которые реально необходимы для бесперебойной работы сайта (кэширование, оптимизация базы данных, создание бэкапов, сжатие изображений).
- Осуществляйте передачу файлов большого объема через FTP, т.к. использование других способов передачи данных приводит к созданию отдельного процесса.
- Осуществляйте массовую почтовую рассылку в моменты отсутствия пиковой нагрузки на сайт, например, ночью или ранним утром.
- При использовании удаленного сервера минимизируйте время ответа и оптимизируйте канал соединения.
- Проверьте наличие проблемных запросов к базе MySQL в файле mysql-slow.log.
Дополнительную нагрузку на сервер, приводящую к появлению ошибки 503, могут создать DDoS-атаки. Защита от них с помощью фильтрации относится к отдельной теме обсуждения.
Следует отметить, что ошибка 503, вызванная перегрузкой серверных мощностей, может пройти сама собой, без внешнего вмешательства. Чтобы понять, произошло ли исправление ситуации, достаточно периодически перезагружать сайт.
Заключение
Ошибка 503 Service Unavailable может возникнуть на любом сайте, управляемом одной из наиболее популярных CMS – WordPress (Вордпресс), Joomla (Джумла), DLE (ДЛЕ) и любой другой, использующей базы данных MySQL. Способов ее решения много, начиная от самых простых на уровне пользователя и заканчивая довольно сложными процедурами, которые должен выполнить администратор сайта.
Буду благодарен, если вы нашли нестандартный подход к устранению сбоя с кодировкой 503 и готовы поделиться своим опытом в комментариях!
Most web users will at some point run into a broken page carrying an “HTTP error 503” message. But what is HTTP error 503?
This is an error encountered when your browser accesses a website that has been unable to establish a connection with its server.
It can be confused for the 502 bad gateway error, but in fact it denotes a more concerning issue, particularly for those without years of IT experience.
Sometimes refreshing the afflicted page can be enough to fix the error, but this is not a foolproof method.
While it might be worth troubleshooting for issues on your own network, in the majority of cases, a 503 error is caused by issues with the web server that the browser is trying to reach. If that is the case, there isn’t much one can do aside from reaching out to the IT admin that runs the page, if you even have that information to hand.
What does HTTP error 503 mean?
Seeing a 503 error indicates that something has stopped your browser from accessing the server of the affected website, and is typically an indication that something is wrong with the server itself.
In 2021, a lot of popular websites experienced 503 errors as a result of the Fastly outage.
Affected sites included all gov.uk sites, online retail such as Amazon and eBay, as well as internet forums like Reddit and news outlets such as Bloomberg News, CNN and The Guardian.
What causes an HTTP error 503?
Determining the root cause of HTTP error 503 can prove very difficult. Despite this, there are a few common causes that it can be helpful to know.
In the majority of cases, HTTP error 503 happens when a website cannot connect with its supported server as a result of a maintenance fault or other technical issue, though it can also be triggered by a distributed denial of service (DDoS) attack.
Unlike HTTP error 400, it is unlikely to stem from a client-side issue such as a mistake in a URL.
Frequent technical issues, such as those occurring multiple times a month, can be especially disruptive, and excessive downtime can cause serious financial difficulty – especially if it heavily depends on online traffic or orders made through e-commerce.
Long outages, such as Atlassian’s two-week issue in 2022, can lead to customer dissatisfaction and reputational damage.
If you find your website frequently shows an HTTP error 503, it could be time to consider alternative hosting providers. Whether your firm seeks free web hosting, cheap web hosting, or anonymous web hosting, good options are available.
Although an HTTP error 503 can diminish the number of customers visiting the site, it can also be caused by an inundation of visitors, such as during seasonal sales. In these cases, the server remains connected, yet is incapable of supporting the avalanche of requests from many different users.
Misconfigured web apps may also cause a 503 error to appear, such as a plugin conflict caused by WordPress, while regular 503 errors could suggest an issue with the domain name system (DNS), whether that’s an incorrect server configuration or an issue with the DNS server itself.
How to fix an HTTP error 503
As you might know, refreshing the web page is the speediest way to revive the website you’re hoping to access. What you might not know is that there are other steps you can take to be certain the issue doesn’t lie with your device connection.
- Restart your PC or router. There could be a problem with your hardware configuration if the «Service Unavailable – DNS Failure» error message pops up. This is, reassuringly, easy to fix since you can simply reboot your device.
- Choose a different DNS server if you find there’s a problem with the DNS server you’ve been allocated.
RELATED RESOURCE
Modern IT experiences with predictable costs
Simplify the daily burden of PC lifecycle management and modernize the employee experience at the same time
DOWNLOAD FOR FREE
There’s not a lot you can do to fix the issue if the 503 error comes about due to a server-side issue. This job lands on the site’s IT administrator who needs to troubleshoot the problem and find a way to fix it since users could be flagging the HTTP 503 errors and get frustrated. Need to apply an update urgently to a site? It’s best to schedule any fixes when the traffic is likely to be fairly low which will ensure web surfers don’t frequently come across problems when visiting your website.
If your site tends to suffer when it experiences surges in traffic, this could mean that you need to invest more in web server resources to errors from recurring.
To prevent any more incidents from taking place, it’s also worth investing in more security protections or increasing the frequency you install patches. Protections against DDoS attacks are already offered by a number of hosting providers, which include measures such as only allowing a certain number of users to access your site over a specific period.
Finally, should the HTTP 503 error be a result of a programming bug, you’ll need to undergo further investigation to pinpoint the issue and rectify it permanently.
A daily dose of IT news, reviews, features and insights, straight to your inbox!
Rene Millman is a freelance writer and broadcaster who covers cybersecurity, AI, IoT, and the cloud. He also works as a contributing analyst at GigaOm and has previously worked as an analyst for Gartner covering the infrastructure market. He has made numerous television appearances to give his views and expertise on technology trends and companies that affect and shape our lives. You can follow Rene Millman on Twitter.
Most Popular
Когда сервер временно не может обработать запрос пользователя, он передает в браузер ответ об ошибке 503. Отсутствие доступа к сайту имеет негативные последствия как для посетителя, который не может просматривать нужный контент, так и для владельца веб-ресурса, рискующего потерять трафик и конверсию. Чаще всего причиной ошибки являются неправильные настройки сервера или движка, с помощью которого создан сайт (CMS). Их исправлением занимается администратор веб-ресурса. Однако иногда уведомление с кодом 503 возникает из-за сбоев на стороне пользователя. Такие неполадки легче и быстрее исправить, и сделать это может посетитель веб-ресурса самостоятельно. В данной статье мы разберем несколько способов устранения ошибки 503, которые могут предпринять администратор и пользователь сайта.
Что значит ошибка 503 Service Unavailable
Ошибка 503 Service Unavailable — это уведомление, которое отправляет сервер, чтобы сообщить о появлении технических неполадок и временной невозможности обработать запрос пользователя. Сообщение появляется на веб-странице, которую пытался открыть посетитель, если на сайте есть проблемный скрипт, на сервер поступает больше запросов, чем он может обработать, или на устройстве и сетевом оборудовании пользователя возникли проблемы с настройками.
Ошибка 503 на сайте означает, что сервер в порядке, но в данный момент недоступен. Чтобы хостинг-компьютер снова начал корректно отвечать браузеру, необходимо найти причину поломки. Это поможет выбрать правильное решение проблемы. Перечислим возможные источники «Error 503»:
- DDoS-атаки и вирусы, приводящие к перегрузке сервера;
- несогласованная работа компонентов веб-страницы (медиаконтента, стилей и скриптов) — элементы каждого уровня запрашиваются и отправляются отдельно;
- последствия хотлинка — сервер тратит трафик и другие вычислительные ресурсы на ответ посетителям других сайтов (если в чужие веб-страницы встроены файлы, хранящиеся на вашем сервере);
- непрерывное обращение к веб-серверу одного из элементов сайта — плагина, виджета, темы;
- сканирование сайта поисковыми роботами и парсерами;
- конфликты плагинов CMS;
- отключение сервера для обслуживания;
- направление большого количества тяжелых запросов к базе данных;
- наличие недостаточно оптимизированных скриптов;
- отправка объемных статичных файлов при помощи скриптов;
- работа почтового сервера — регулярная рассылка большого количества сообщений;
- подключение к удаленному серверу — может привести к лишним HTTP-запросам, тайм-аутам, обрывам связи и т. д.
Пользователю не стоит сразу отказываться от попыток восстановить работоспособность сайта и искать новый сервис. Error 503 может возникнуть из-за проблем с его компьютером, модемом, операционной системой, программным обеспечением и браузером. Если не устранить причину сбоя, ошибка будет систематически возникать и при посещении других веб-ресурсов. К тому же от него не требуется выполнения сложных действий или больших временных затрат — проверка наличия проблем на стороне пользователя займет всего несколько минут.
Как исправить ошибку 503 владельцу сайта
К ошибке HTTP 503 чаще всего приводят сбои, происходящие на сервере. Их исправление — ответственность владельца веб-сайта. Решение некоторых проблем не требует особых навыков, для других придется обратиться к вебмастеру или техническому специалисту с опытом в администрировании серверов.
Перезагрузка сервера
Так же как перезагрузка модема и маршрутизатора помогает пользователям очистить кэш DNS-серверов, в котором накопился проблемный код, и вернуть доступ к веб-ресурсу, так и перезапуск сервера необходим администраторам для избавления от некоторых ошибок и восстановления работоспособности сайта. Если вы арендуете сервер или его часть у хостинг-провайдера, для перезагрузки сервера вам потребуется войти в панель управления хостингом и выполнить несколько действий:
-
Выберете нужный заказ и откройте вкладку «Администрирование».
-
Перейдите в пункт «Управление операционной системой» и нажмите кнопку «Перезагрузить».
На перезапуск системы уйдет всего несколько минут.
Автоматическое обслуживание
Даже хорошо оптимизированный веб-ресурс не может работать 100% времени. Сервер и расположенный на нем сайт могут стать временно недоступными при выполнении некоторых видов технических работ:
- установке обновлений операционной системы и приложений;
- проверке безопасности системы и поиске вредоносных программ;
- автоматическом обновлении CMS и ее компонентов (тем, плагинов) и так далее.
График проведения мероприятий по автоматическому обслуживанию сообщается администраторам сайтов заранее. Если предупредить пользователей о возможном появлении проблем с доступом к веб-ресурсу в определенный период времени, можно сократить количество отказов от просмотра сайта при появлении ошибки 503.
Проверка настроек конфигурации брандмауэра
Неправильно настроенный брандмауэр сервера может принять несколько связанных IP-адресов за DDOS-атаку. При выставлении параметров брандмауэра ориентируйтесь на особенности выбранной CMS и характеристики вашего веб-сервера.
Обратитесь в службу технической поддержки
Если сайт недоступен и установить причину своими силами не удалось, обратитесь в службу технической поддержки хостинга. Специалист саппорта сообщит о технических работах и времени их окончания или поможет установить другой источник ошибки 503. В Интернет Хостинг Центре обратиться за помощью можно через раздел «Задать вопрос» в панели управления хостингом или через чат. При создании тикета необходимо подробно описать проблему и приложить скриншот.
Снижение нагрузки на сервер
Существует несколько способов справиться с большим количеством запросов, адресуемых серверу. Каждый из них подойдет для решения конкретной проблемы:
- Установка защитного экрана, например, CloudFlare, для защиты от хакерских атак и других угроз безопасности.
- Оптимизация и удаление лишних скриптов для быстрой обработки запросов.
- Выбор антилич-плагина, поддерживаемого вашей CMS, для защиты от хотлинка.
- Удаление компонентов, постоянно обращающихся к серверу.
- Запись в robots.txt пользовательских приложений (user agent), создающих нагрузку на сайт.
- Проверка совместимости плагинов и тем друг с другом путем их попеременного отключения и тестирования работы сайта без них.
- Обмен объемными файлами большого размера по протоколу FTP.
- Организация рассылки в период сниженной нагрузки на сервер, например, ранним утром.
- Контроль над количеством email-сообщений, отправляемых одновременно.
Как решить проблему, если вы — пользователь
Ошибка 503 происходит на сервере, и если ее обнаружил пользователь веб-ресурса, он может сообщить об этом владельцу сайта и подождать устранения проблемы. В получении контактов поможет сервис Whois, который проверяет регистрационные данные домена и содержит информацию о его арендаторе. Однако такое решение может занять большое количество времени, кроме того, не часто, но код 503 может появляться из-за ошибок на компьютере и сетевом оборудовании пользователя. Что пользователь может предпринять самостоятельно, чтобы убедиться, что он не является причиной временно отсутствия доступа к веб-ресурсу:
- Отключите от питания сетевое оборудование на три минуты. Если ошибка происходила из-за проблем с IP пользователя, после включения роутера адрес поменяется и сайт снова станет доступным.
- Перезагрузите модем. Если причина в ПО внешних устройств, передающих вам трафик, может помочь перезагрузка сетевого оборудования.
- Очистите кэш и другие временные файлы в браузере. Для этого воспользуйтесь сочетанием клавиш Ctrl+F5.
- Смените браузер или перезапустите его. Это поможет избавиться от ошибок в текущей сессии и понять, является ли браузер источником ошибки.
- Перезагрузите операционную систему. Сбой в ОС и программном обеспечении будет исправлен автоматически при новом запуске компьютера.
Заключение
Способов устранения ошибки 503 так же много, как и причин ее появления. Пока администратор сайта решает сложные технические вопросы, пользователь может проверить на причастность к сбоям собственную технику и установленное на ней ПО.
Похожие статьи
-
Пока вы ждете загрузки сайта в окне браузера, на его сервере происходит обработка запроса, в результате чего он выдает или не выдает вам нужную информацию. Часто в процессе выполнения пользовательского запроса возникают различные ошибки, и вместо страницы мы получаем сообщения вроде Error 401, 404, 504 и т. п. Это значит, что что-то пошло не так и сайт не смог выполнить запрашиваемое действие. Цифры в названии ошибки означают ее код. Он указывает на наличие определенного типа проблемы. Одной из самых распространенных является формулировка «403 Forbidden Error». В статье мы расскажем, что делать, когда появляется 403 ошибка на сайте, что это означает, почему возникает и как ее устранить.
-
Чтобы на веб-странице появился контент, браузер должен получить от сервера, на котором расположен сайт, необходимые данные. Когда на устройстве пользователя, на веб-сервере или на другом промежуточном узле (например, прокси) возникают неполадки, вместо содержимого сайта в браузере появляется страница с ошибкой. Для устранения сбоя, необходимо знать, на чьей стороне он произошел и по какой причине. Понять, что является источником проблемы, помогает цифровой код ошибки. Если он имеет формат 5xx, значит, сбой происходит на стороне сервера. Разбираем в статье ошибку 504 на сайте и способы ее устранения.
-
Посещая сайты в интернете, мы часто натыкаемся на различные ошибки при загрузке. Часть из них вызвана проблемами на стороне сервера, многие связаны с настройками пользовательского устройства, некоторые возникают из-за сбоев в работе интернет-служб. Страница «Error 1020 Access Denied» обычно открывается на веб-сайтах, которые используют сервисы компании Cloudflare (сеть доставки контента (CDN), защиты от DDoS-атак, DNS-серверы), когда та блокирует IP-адрес пользователя. Но существуют и другие причины, по которым возникает ошибка 1020 на сайте. Мы разберем ситуации, когда проблема носит локальный характер, и подскажем, как устранить эту неисправность на стороне пользователя.
What’s the HTTP 503 Service Unavailable Error?
The HTTP 503 Service Unavailable error means that a website can’t be reached at the moment because the server is not ready to handle the request. This could happen because it’s too busy, under maintenance, or something else which requires a deeper analysis.
Running into errors on your site can be intimidating. However, most errors give you some clue as to what caused them, which can make troubleshooting these common issues a lot easier. The 503 error is not as polite, unfortunately, and doesn’t give you much information to go on.
It helps to understand what the most common causes are for the 503 error. After that, you’ll need to be methodical when it comes to troubleshooting the error, which means following several steps in order to locate the root cause.
In this article, we’ll cover what the 503 error is and how it typically manifests. Then we’ll guide you through six steps in order to troubleshoot it. Let’s get to work!
Check Out Our Video Guide To Fixing Different Types of 500 Errors
What Is an HTTP Error 503?
The Internet Engineering Task Force (IETF) defines the 503 Service Unavailable as:
The 503 (Service Unavailable) status code indicates that the server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. The server MAY send a Retry-After header field to suggest an appropriate amount of time for the client to wait before retrying the request.
When you encounter the 503 error, it means that the server in question is unavailable. That could be because it’s too busy, for example, or it’s under maintenance. Unlike other similar error codes, 503 signifies that your website is online and running, but can’t be reached at the present moment.
What’s so vexing about this particular error is that it barely gives you any information to go on. Most of the time, it just shows up with a “Service temporarily unavailable” message. That’s the equivalent of calling a restaurant via phone, only to have them tell you that they’re closed but refuse to let you know when they’ll be open again.
If you’re lucky, the 503 error code will have occurred because your website is under maintenance. WordPress very briefly sets your site to maintenance mode when you’re updating a plugin, a theme, or the core software:
Usually, this timeout is so brief that no one will notice it. However, in those cases where the 503 error persists, you’ll have a bigger problem to deal with. After all, not only will users be unable to visit your site, but you’ll lose access to your WordPress admin area as well. That means you can’t update your site in any way, and in order to troubleshoot it, you’ll need to dig into its files.
Error Code | 503 service unavailable error |
Error Type | Server-side error |
Error Variations | 503 Service Unavailable 503 Service Temporarily Unavailable HTTP Server Error 503 HTTP Error 503 |
Error Causes | Unexpected traffic spikes Server communication problems Resource usage exhaustion DDoS attack Plugin or theme incompatibility |
503 Error Variations
The 503 error can show up in a lot of ways. However, almost every variation comes accompanied by that 503 code, making it easy to identify.
Here are some of the variations you might encounter, depending on your server configuration and browser:
- 503 Service Unavailable
- 503 Service Temporarily Unavailable
- HTTP Server Error 503
- HTTP Error 503
- Error 503 Service Unavailable
- The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.
Whatever the code you run into might look like, it means you need to get to work fast before it affects your users negatively.
Have you ever run into the 503 error? That’s a bummer! 😱Follow these 6 steps to fix it and get your site back online in no seconds!Click to Tweet
What Causes an HTTP Error 503?
These are the most common reasons why a server is temporarily unable to handle a request:
- There is a high number of requests being sent to the server, exhausting all the available resources.
- The server is experiencing technical issues or maintenance work.
- The server could be under a Denial of Service (DDoS) attack.
There are also other technical issues triggering the 503 error, like problems with your plugins or theme. More on that below.
How to Fix the 503 Error?
Since you often can’t be sure what caused the 503 error in any given situation, you’ll need to go about troubleshooting it methodically. The following six sections each cover a potential fix, aimed at resolving the different potential root causes.
After each step, take a moment to return to your website and see if the 503 error is gone. If it is, you’ve successfully fixed the issue. If not, continue on to the next step in the process.
1. Temporarily Deactivate Your Plugins
One of the most common causes of the 503 error in WordPress is plugin compatibility issues. To determine if that’s what’s happening, you’ll need to disable all of your site’s plugins.
Since the 503 error prevents you from accessing the admin area, you’ll need to use an FTP client for this step. If you don’t have one set up, we recommend FileZilla.
Once your FTP client is ready, connect to your website through it and navigate to your root folder. In case you can’t find it, it’s usually called public_html, html, public, www, or your site’s name. If you’re a Kinsta client, it’s your public folder.
Open that folder, and navigate to the wp-content directory. Inside, you’ll see a folder called plugins, which contains individual subdirectories for each of the plugins installed on your site (both active and inactive).
What you’re going to do now is right-click on the plugins folder, and rename it to something else. We recommend plugins.old or plugins.deactivated, so you can easily recognize it later.
WordPress will now not be able to find any of your plugins. When that happens, it will automatically disable those plugins.
Now, try accessing your dashboard. If the 503 error is gone, then you can assume that one of your plugins was the culprit. All you have to do is figure out which one was at fault.
Return to the wp-content directory, and rename your original plugins folder correctly. Then, you’ll need to disable each of your plugins one by one, until you find the culprit.
To do this, open the wp-content/plugins directory. Inside, you’ll find one folder for each of your plugins. The process you’re going to follow is much the same as before:
- Start with the first folder, and rename it to anything you like.
- Check your website to see if the error is gone.
- If it isn’t, return the plugin folder from the previous step to its original name.
- Move on to the next plugin on your list, repeating the above steps.
This process can take a while if you have a lot of plugins, but it’s vital to check each plugin in turn. If at any point you identify the plugin that’s causing the error, you can uninstall it or replace it with another tool.
If you make it to the end of these steps without finding a solution, you can move on to the next stage of troubleshooting.
2. Deactivate Your Website Theme
Now that you’ve ruled out your plugins as the cause of the 503 error, it’s time to do the same with your active theme. In fact, your theme could also be creating compatibility issues.
Unfortunately, the process doesn’t work the same as above. WordPress won’t revert to the default theme if simply rename the theme folder, you would end up with an error like “The theme directory “theme name” does not exist.” Or if you try to rename the entire theme directory folder, you end up with “ERROR: The themes directory is either empty or doesn’t exist. Please check your installation.”
Therefore, you need to access your WordPress database by logging into phpMyAdmin. If you’re a Kinsta client, this can be found within the “Info” section of the MyKinsta dashboard.
Once in phpMyAdmin, click into the “wp_options” table, then click on the “Search” tab. You will want to search under the “option_name” for template.
Under the “option_value” column you will see the current name of your theme. Change this to one of the default themes, such as “twentynineteen.”
Check your website again to see if this has fixed the error. If it did, it simply means it’s a problem with your website theme and you might want to try reinstalling it or reverting to your most recent backup.
3. Temporarily Disable Your Content Delivery Network (CDN)
Sometimes, the 503 error will show up not because of a problem on your website, but because of your Content Delivery Network (CDN). If you’re using a CDN, a quick way to figure out if that’s the case is to temporarily disable it.
Every CDN should include some feature that enables you to pause its services. If you’re on Kinsta, you can disable your Kinsta CDN by navigating to CDN → “Disable CDN” inside your MyKinsta dashboard:
The process you need to follow may be different depending on which CDN you’re using. Cloudflare has also been known to cause 503 errors sometimes. If you can’t find the option to pause yours, check out your service’s knowledge base, which will usually contain detailed instructions.
If you don’t use a CDN or find that pausing your service doesn’t help with your issue, there are still a few more fixes to try. Do remember to reactivate your CDN before moving on.
4. Limit the WordPress ‘Heartbeat’ API
The WordPress Heartbeat is an API built into WordPress, which the platform uses for auto-saving content, showing you plugin notifications, letting you know when someone else is working on a post you’re trying to access, and more.
Just like a regular heartbeat, the API works in the background with a high frequency so that it doesn’t miss anything. As you might imagine, this API consumes server resources. Usually, that’s not a problem but in some cases, it may lead to a 503 error if your server can’t handle the load.
The quickest way to determine if the Heartbeat API is at the center of your problems is to temporarily disable it. To do that, connect to your WordPress website via FTP once more, and then open your current themes folder and look for the functions.php file within:
Right-click on the file and select the View/Edit option, which will open it using your local text editor. Once it’s open, you’ll need to add the following code snippet within:
add_action( 'init', 'stop_heartbeat', 1 );
function stop_heartbeat() {
wp_deregister_script('heartbeat');
}
Those three lines of code tell WordPress to disable the Heartbeat API. Save the changes to the functions.php file, close it, and try to access your website again.
If the 503 error is gone, you’ll know that the API was the problem. Disabling it altogether removes a lot of useful functionality, however. Instead, we recommend that you ‘slow down’ the Heartbeat, so that it doesn’t cause problems.
The easiest way to do that is by installing the Heartbeat Control plugin. Activate the plugin and navigate to the Settings > Heartbeat Control section. Look for the Modify Heartbeat options, and drop the frequency to the lowest possible number:
Save the changes to your settings and return to the functions.php file you tweaked a while back. For the above changes to work, you’ll need to remove the string of code you added before and save your changes to the file.
At this stage, the 503 error should be gone if the Heartbeat API was the problem. If it isn’t, then it’s time to try something different.
5. Increase Your Server’s Resources
If the 503 error is still occurring despite all your attempts to fix it so far, then there’s a good chance the problem might be due to a lack of server resources. That is to say, you’ll need to upgrade your hosting plan to see if that fixes the issue. This is especially true if you’re using cheap WordPress hosting, as they tend to throttle resources.
We don’t do this at Kinsta. We offer great Managed WordPress Hosting (as well as Application Hosting and Database Hosting).
Upgrading your plan is a big decision, however. The smart move is to first contact your web hosting support service and discuss the 503 error with them, as well as the steps you’ve taken so far to try and solve it. The support team should be able to help you work out the cause and advise you on whether you need to upgrade your plan or not.
6. Review Your Logs and Enable WP_DEBUG
You should also take advantage of your error logs. If you’re a Kinsta client, you can easily see errors in the log viewer and enable WordPress debug mode in the MyKinsta dashboard. This can help you quickly narrow down the issue, especially if it’s resulting from a plugin on your site.
If your host doesn’t have a logging tool, you can also add the following code to your wp-config.php file to enable logging:
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );
The logs are typically located in the /wp-content directory. Inside it, look for a file called debug.log and open it up.
Others, like here at Kinsta might have a dedicated folder called “logs”.
Interpreting your debug log can be a bit intimidating but it’s not as hard to read as you might imagine. In a nutshell, the log contains each error that pops up on your site in chronological order. It shows which file caused each error, as well as which specific lines of code were involved.
Beware: you’re not going to find direct references to the 503 error within your log. Even so, if all else fails, it can point you in the right direction by showing you what files are causing problems. That way, you’ll know where to focus your efforts next. As we mentioned in the previous step, now is a good time to get in touch with your hosting provider if you need further assistance resolving this error.
You can also check the log files in Apache and Nginx, which are commonly located here:
- Apache: /var/log/apache2/error.log
- Nginx: /var/log/nginx/error.log
To learn more, please check out our web server showdown: Nginx vs Apache.
If you’re a Kinsta client you can also take advantage of our analytics tool to get a breakdown of the total number of 503 errors and see how often and when they are occurring. This can help you troubleshoot if this is an ongoing issue, or perhaps something that has resolved itself.
If the 503 error is displaying because of a fatal PHP error, you can also try enabling PHP error reporting. Simply add the following code to the file throwing the error. Typically you can narrow down the file in the console tab of Google Chrome DevTools.
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
And you might need to also modify your php.ini file with the following:
display_errors = on
Summary
If you’re lucky, the 503 error will only show up when you put your website into maintenance mode. However, if it appears without warning, then you’ll have to roll up your sleeves and do some troubleshooting.
To get at the root cause of the 503 error, you’ll need to follow these steps to fix it:
- Temporarily Deactivate Your Plugins.
- Deactivate Your Website Theme.
- Temporarily Disable Your Content Delivery Network (CDN).
- Limit the WordPress ‘Heartbeat’ API.
- Increase Your Server’s Resources.
- Review Your Logs and Enable WP_DEBUG.
Have you ever run into the HTTP 503 error? Share your experiences with us in the comments section below!
Jan 4, 2022 8:01:16 AM |
503 Service Unavailable Error: What It Is and How to Fix It
A close look at what a 503 Service Unavailable Error is, including troubleshooting tips to help you resolve this error in your own application.
A 503 Service Unavailable Error is an HTTP response status code
indicating that a server is temporarily unable to handle the request. This may be due to an overloaded server or a server that’s down for maintenance. This particular response code differs from the 500 Internal Server Error we explored some time ago. While a 500 Internal Server Error indicates an issue preventing the server from handling the request entirely, a 503 Service Unavailable Error indicates that the server is still functioning properly and can process the request, but has opted to return the 503 response code.
There are dozens of possible HTTP status codes used to represent the complex relationship between the client, a web application, a web server, and multiple third-party web services. As you can imagine, determining the cause of a particular status code can be challenging. That’s why, in this article, we’ll examine the 503 Service Unavailable Error in-depth. By the end of this article, you’ll know what a 503 Service Unavailable Error is and how to troubleshoot and fix it.
The Problem is Server-Side
All HTTP response status codes that are in the 5xx
category are server error responses
. Unlike the 502 Bad Gateway Error
, which indicates that a server somewhere in the connection chain is down or unavailable; a 503 Service Unavailable Error indicates that the server is temporarily unable to handle the request but is otherwise functioning as normal. Furthermore, unlike gateway-related 5xx
response codes that indicate issues either on the web server or another server further upstream, the 503 Error code indicates an issue on the actual web server hosting your application.
In most cases, the web server should provide a user-friendly page showing that the service is temporarily unavailable. Additionally, the application should send a Response-After
HTTP header. This header should inform the user agent (client) how long it should wait to attempt the request again. This value should either be a Date
value indicating the timestamp the service will be available, or a numeric value indicating how many seconds from now the user agent must wait to retry.
Since a 503 Error means something is wrong with the server
of your application, you can disregard the client
side of things. That means you can ignore most client-side code and components, such as HTML, cascading style sheets (CSS), client-side JavaScript, etc.
This doesn’t apply solely to websites, either. Normal web applications will often power smartphone apps that have a modern-looking user interface. If a 503 Service Unavailable Error occurs on a smartphone app, the issue will lie outside of the installed app. The problem will be something on the server-side, which performs most of the logic and processing for the app.
That’s the 503 Service Unavailable Error in a nutshell. In the next section, we’ll go over how to diagnose and fix this error.
Start With a Thorough Application Backup
Before attempting any fixes or changes to the system, perform a full backup of your application, database, and so forth. Otherwise, you might find yourself with additional errors and latent errors. If you have the capability, create a complete copy of the application onto a secondary staging
server that isn’t «live.» This will give you a clean testing ground to test all potential fixes to resolve the issue without threatening the security or sanctity of your live application.
Diagnosing a 503 Service Unavailable Error
As mentioned before, a 503 Error indicates that the server (typically the actual web server on which your application is running) is temporarily unavailable. This is usually due to the server being «down» for scheduled maintenance or due to a heavy traffic load that prevents it from properly serving all incoming requests.
The Server is Down for Maintenance
A 503 Error should pop up if the server is down for maintenance. The server has not actually crashed or shut down but is in a mode of service that prevents requests from behaving as normal. That is why a once normally-functional page will display a 503 Service Unavailable Error, alongside a message about the server being down for maintenance. Only administrators will have access to the server, whereas normal public requests will be turned away until maintenance is complete.
The Server is Overloaded
A server will reject requests due to overload from an unexpected onslaught of traffic and incoming requests. Basically, the server has throttled itself in order to maintain some semblance of normal behavior for a portion of requests. If the application/server is configured correctly, you should be able to complete the request by waiting and retrying a few times. By waiting, the traffic spike should die down and let you in.
If the error is not the result of maintenance or overload, then you’ll need to troubleshoot further.
We’ll go over some troubleshooting tips and tricks to help you resolve this issue. If nothing here works, don’t forget that Google is your friend. Search for specific terms related to your issues. Chances are you’ll find others who have experienced this issue and found ways to resolve it.
Troubleshooting on the Server-Side
Most of the time, a 503 Service Unavailable Error results from maintenance or a traffic overload. When that’s not the case, here are some additional tips to help you troubleshoot what might be causing this error.
Reboot the Server
There could be a bottleneck within your app’s server chain causing a 503 Error. One of the simplest solutions to this is to restart the web server hosting the application. If your application is spread over multiple servers, make sure all are rebooted properly to bring the system back online as normal.
Check for Unexpected Maintenance
Your server and/or application may be automatically configured to go down for maintenance. Many modern content management systems, like WordPress, will automatically download and install updates to their base software without any intervention on your behalf. The web server could be issuing a 503 Service Unavailable Error during this period. If you’re able to access the administration settings of your application/server, check the configuration options for automatic maintenance scheduling. You may have the option to disable this setting if you’d rather have direct control over that process. Don’t forget to upgrade to newer versions fairly regularly, as they typically include critical security fixes.
Server Connectivity Issues
A 503 Error may indicate that a server somewhere in the chain is down or unreachable. Most modern applications don’t reside on a single server. Instead, applications are spread over multiple systems or rely on third-party services to function. If one of these servers goes down, you might see a 503 Error that appears to be from your own application.
Improper Firewall Configuration
A firewall is a basic security device that monitors network traffic and acts as a gatekeeper. It helps decide which traffic is safe and which could be malicious. In most cases, firewalls stop potentially harmful traffic (and may be logged for network admin use). But it’s possible that a firewall configured somewhere on the network is preventing critical traffic from getting through. This is particularly true for applications that rely on content delivery networks (CDNs
). These CDNs act as a third-party host for «heavy» content like images or videos on behalf of your application, so your application can maintain its speed and efficiency. However, automatic firewall services sometimes perform false positives, mistaking perfectly safe and valid content from CDNs as malicious. When this happens, the firewall will shut off that stream of content, leading to a 503 Error.
Check the Logs
Nearly every web application will keep some form of server-side logs, such as Application Logs and Server Logs.
-
Application logs:
These logs contain the history of what the application did. This usually includes requested pages, connected servers, database results, and so forth.Server logs
: These logs are related to the actual hardware running the application and will often provide details about the health and status of all connected services, or just the server itself. Google «logs [PLATFORM_NAME]» if you’re using a CMS, or «logs [PROGRAMMING_LANGUAGE]» and «logs [OPERATING_SYSTEM]» if you’re running a custom application to get more information on finding the logs in question.
Application Code or Script Bugs
If all else fails, check your code. A bug could be causing the 503 Service Unavailable Error. Try diagnosing the issue by manually debugging your application and parsing through application and server logs. Ideally, make a copy of the entire application to a local development machine and perform a step-by-step debug process. This will allow you to recreate the exact scenario in which the 503 Service Unavailable Error occurred. Once you know why the error occurred, you can go about fixing it.
A 503 Service Unavailable Error within your web application is a strong indication that you may need an error management tool. That’s where Airbrake comes in. Airbrake Error & Performance Monitoring software provides real-time error monitoring and automatic exception reporting for all your development projects. Airbrake’s dashboards ensure you receive round-the-clock status updates on your application’s health and error rates.
Plus, Airbrake makes it easy to customize exception parameters while giving you complete control of the active error filter system, so you only gather the errors that matter most.
Check out Airbrake’s error monitoring software today and see for yourself why so many of the world’s best engineering teams use Airbrake to revolutionize their exception handling practices!
Note: We published this post in November 2017 and recently updated it in January 2022.