I’m really new to setting up web servers in general. I’ve got IIS 8 on Windows 8, and I’m trying to set up a little site locally, while doing some development. In IIS I choose Add Site, give a name, points to a location where I have a index.html file (I’ve tried different locations, latest in a c:inetpubwwwroottest -folder) and otherwise use all default settings. However, when I try to browse to localhost I get
HTTP Error 503. The service is unavailable.
I’ve verified the pool is started, and I’ve given IIS_IUSRS Full Control on the target folder
I’ve search around but not found anything that solved my issue, and there’s nothing helpfull in the EventLog or in the C:WindowsSystem32LogFilesHTTPERR folder
Could anyone tell me what’s wrong?
weir
4,4322 gold badges27 silver badges41 bronze badges
asked Nov 10, 2012 at 14:33
4
It could be that the user identity is outdated, especially if you’ve tried starting a stopped app pool and the next request again fails.
In IIS, go to the Application Pools under the Server, then find the correct Application Pool for your web site, and click on it. On the Advanced Settings menu to the right, select Identity and change it and enter new user and password. Click on your Application Pool again, and select Recycle to restart it.
You can also try looking at the error message in Event Viewer, under Windows Logs, Application, Details tab.
Broots Waymb
4,6553 gold badges30 silver badges51 bronze badges
answered Oct 30, 2013 at 13:02
live-lovelive-love
46.3k22 gold badges227 silver badges197 bronze badges
8
Other answers are fine. But in my case, I was working on a Windows box that already was running some old IIS, IISExpress or any other web site. What happened is urls ACLs where reserved somehow in the system. So, you might want to check this.
Here is the console command to dump all URL acls:
netsh http show urlacl
Check what’s returned here, and if anything matches the url you are testing, here is the command to delete one URL acl (for example):
netsh http delete urlacl url=http://localhost:2018/
(beware to carefully note what you do here in case it was not related to the original problem)
answered Jan 16, 2015 at 14:11
Simon MourierSimon Mourier
128k20 gold badges246 silver badges291 bronze badges
5
In my case the problem was the DefaultAppPool. I changed the «Load User Profile» to false and now it works. However, I don’t know if there are side effects to this.
Further reading on setting the Load User Profile option: What exactly happens when I set LoadUserProfile of IIS pool?
TylerH
20.5k62 gold badges75 silver badges97 bronze badges
answered Apr 18, 2014 at 16:54
2
Check your application’s respective Application Framework Pool — it could be stopped. If it is, start it and check again.
If you’re still experiencing issues you can also check out Event Viewer to find the cause of that error in order to troubleshoot more.
Robotnik
3,5452 gold badges32 silver badges48 bronze badges
answered Oct 25, 2013 at 10:20
ScoolsamScoolsam
5714 silver badges3 bronze badges
1
If the app pool is running under some specific user identity, then go to the advanced settings and update the username and password again to ensure they are correct.
TylerH
20.5k62 gold badges75 silver badges97 bronze badges
answered Aug 16, 2013 at 15:17
0
If the app pool immediately stops after you start it and your event log shows:
The worker process for application pool ‘APP_POOL_NAME’ encountered an
error ‘Cannot read configuration file ‘ trying to read configuration
data from file ‘?’, line number ‘0’. The data field contains
the error code.
… you may experiencing a bug that was apparently introduced in the Windows 10 Fall Creators Update and/or .Net Framework v4.7.1. It can be resolved via the following workaround steps, which are from this answer to the related question Cannot read configuration file ‘ trying to read configuration data from file ‘\?<EMPTY>’, line number ‘0’.
- Go to the drive your IIS is installed on, eg.
C:inetpubtempappPools
- Delete the directory (or virtual directory) with the same name as your app pool.
- Recycle/Start your app pool again.
I have reported this bug to Microsoft by creating the following issue on the dotnet GitHub repo: After installing 4.7.1, IIS AppPool stops with «Cannot read configuration file».
EDIT
Microsoft responded that this is a known issue with the Windows setup process for the Fall Creators Update and was documented in KB 4050891, Web applications return HTTP Error 503 and WAS event 5189 on Windows 10 Version 1709 (Fall Creators Update). That article provides the following workaround procedure, which is similar to the one above. However, note that it will recycle all app pools regardless of whether they are affected by the issue.
- Open a Windows PowerShell window by using the Run as administrator
option.- Run the following commands:
Stop-Service -Force WAS
Remove-Item -Recurse -Force C:inetpubtempappPools*
Start-Service W3SVC
answered Nov 27, 2017 at 15:33
weirweir
4,4322 gold badges27 silver badges41 bronze badges
1
Or if none of the current solutions work, look in your website’s directory for a file called app_offline.htm
. That basically tells IIS that your site is unavailable and to show this page instead.
To fix it, either delete it or rename it to app_offline.htm.bak
.
In my case, I added it while showing a colleague how to use that to prevent traffic to the site temporarily and then forgot that I did that on my box. Sigh.
answered Oct 15, 2015 at 14:50
HallmanacHallmanac
5292 gold badges8 silver badges14 bronze badges
0
Start by looking in Event Viewer, either under the System or the Application log.
In my case the problem was that no worker process could be started for the App Pool because its configuration file couldn’t be read — I had included an extra ‘.’ at the end of its name.
answered Mar 22, 2013 at 15:36
Samuel JackSamuel Jack
32.3k16 gold badges117 silver badges155 bronze badges
It is possible that your domain requires the account used for running the AppPool to have batch logon rights. In which case you will see this same error message. The way you can tell if that is the case, is by looking at the System events in the Event Viewer. There should be an event saying that the account being used with the App Pool has either ‘the wrong password or does not have batch logon rights’.
This is why developers quite often use IIS Express on their development machine, since it by passes the batch logon rights issue.
answered Jan 30, 2013 at 14:56
Hashim AkhtarHashim Akhtar
7772 gold badges10 silver badges16 bronze badges
I ran into the same issue, but it was an issue with the actual site settings in IIS
.
Select Advanced Settings...
for your site/application and then look at the Enabled Protocols
value. For whatever reson the value was blank for my site and caused the following error:
HTTP Error 503. The service is unavailable.
The fix was to add in http
and select OK
. The site was then functional again.
answered Oct 17, 2013 at 20:31
atconwayatconway
20.3k28 gold badges153 silver badges226 bronze badges
2
For my case, My Default Application Pool was offline.
To troubleshoot the problem, I checked the IIS logs located in C:WindowsSystem32LogFileHTTPERR. Scroll down to the most recent error logs, this will show you problems with IIS if any.
My Error was «503 1 AppOffline DefaultPool»
Solution
- Open IIS Manager
- Click on Application Pools, this lists all application pool to your right.
- Check if the application pools hosting your api or site has a stop sign on it. If so, right click the application pool and click start.
- Try again to access your service from the client
Ryan M♦
17.3k30 gold badges60 silver badges71 bronze badges
answered Jun 22, 2018 at 14:54
mut tonymut tony
3377 silver badges9 bronze badges
Check Event Viewer — Windows — Application. If there is a red Error line made from IIS-W3SVC-WP and the message is like The Module DLL C:Windowssystem32inetsrvrewrite.dll failed to load. The data is the error. then you are missing some Windows Setup features.
In Windows Server 2012 go to Server Manager, Add Roles and Features, Web Server (IIS) and add the matching feature. Usually, most of the Application Development section is installed. Here is a complete list of IIS features and their associated DLL to help in diagnosis.
After going through a few iterations of that I ended on the error message above regarding «rewrite.dll». This led to a direct download and install of Microsoft URL Rewrite tool. Finally all websites came to life.
answered Nov 10, 2014 at 19:25
SushiGuySushiGuy
1,49317 silver badges20 bronze badges
2
Our server ran out of disk space on Sunday afternoon which led to an application suddenly failing and returning HTTP error 502. The logs were empty so it had to be something that was occurring before IIS even did anything.
A swift look at the event viewer(WIN+R > eventvwr
) exposed the issue.
It’s a good idea to filter out the output of the System and Application windows to WAS since it can get pretty verbose in there.
The application depended on another one which was disabled. Therefore keep in mind an application can go down indirectly if one of it’s dependent processes has gone down. We simply re-enabled the .NET application pool and our other application started running normally again.
answered Feb 27, 2017 at 17:05
Patrick.SEPatrick.SE
4,3635 gold badges33 silver badges44 bronze badges
If you have IIS URL Rewriting installed it could be to do with that. I suffered issues after a Windows 10 Update.
This StackOverflow post helped me.
Go to Windows Control Panel
> Programs and Features
> IIS URL Rewrite Module 2
> Repair
.
answered Apr 25, 2016 at 11:23
ᴍᴀᴛᴛ ʙᴀᴋᴇʀᴍᴀᴛᴛ ʙᴀᴋᴇʀ
2,7341 gold badge26 silver badges38 bronze badges
1
In my case, the problem was that another application was using the port that I had bound to my web site.
I found it by running the following command from a command line, which lists all of the listening ports and the executable involved:
netstat -b
answered Mar 25, 2016 at 21:23
AvalanchisAvalanchis
4,4713 gold badges37 silver badges47 bronze badges
If you have McAfee HIPS and if you see the following error in event viewer application log:
The Module DLL C:WindowsSystem32inetsrvHipIISEngineStub.dll failed to load.
The data is the error.
Then this workaround on McAfee.com resolved the issue in my case.
Quote from the page:
- Click Start, Run, type explorer and click OK.
- Navigate to: %windir%system32inetsrvconfig
- Open the file applicationHost.config as Administrator for editing in Notepad.
Edit the <globalModules> section and remove the following line:
<add name=»MfeEngine» image=»%windir%System32inetsrvHipIISEngineStub.dll» />Edit the <modules> section and remove the following line:
<add name=»MfeEngine» />- After you have finished editing the applicationHost.config file, save the file, then restart the IIS server using iisreset or by restarting the system.
Stacked
6,6246 gold badges55 silver badges73 bronze badges
answered Dec 28, 2014 at 15:01
Orhan CelikOrhan Celik
1,49315 silver badges12 bronze badges
0
Actually, in my case https://localhost was working, but http://localhost gave a HTTP 503 Internal server error. Changing the Binding of Default Web Site in IIS to use the hostname localhost instead of a blank host name.
tname for http binding
answered Aug 30, 2018 at 14:58
Tore AurstadTore Aurstad
2,94224 silver badges21 bronze badges
This could also happen if any recent installs or updates happened with .NET framework and/or ASP.NET. If you are unsure of what happened recently and if all your apps use ASP.NET version 4, you can try reset them by running the following commands in command prompt in administrator mode.
cd C:WindowsMicrosoft.NETFramework64v4.0.30319
aspnet_regiis -i
This makes sure to install or reinstall ASP.NET 4 and updates existing applications to use ASP.NET 4 version of the app pool. It updates both IIS Classic and Integrated mode handlers and script mappings in the IIS metabase. It also recreates ASP.NET v4.0 and ASP.NET v4.0 Classic app pools, and sets .NET framework 4 to DefaultAppPool and Classic .NET app pools.
answered Mar 31, 2016 at 15:59
Prabu ArumugamPrabu Arumugam
1,9192 gold badges15 silver badges19 bronze badges
I changed the port from 80 to 8080, that’s why this error occur. I write localhost/ in search bar then this error occur. My problem is resolved by writing localhost:8080/ in the search then local host open.
answered Aug 1, 2019 at 5:22
1
This happened to me on a server on our intranet. After browsing through blog posts and Windows logs, it turned out that a few days before Christmas 2015 (related to a Windows Update?) my web site application pool wanted to create a config file in folder c:inetpubtempappPools, but access to this folder was restricted. This caused the application pool to be disabled.
After adding Full control to Everyone on this temp folder, I restarted the Windows Process Activation Service and everything went online again.
If I’d been a little more elegant, it would probably had been enough to grant the AppPool user full control to the folder, but I never seem to remember how the app pool name and app pool user relates to eachother…
answered Jan 20, 2016 at 15:41
Daniel PerssonDaniel Persson
2,1511 gold badge17 silver badges24 bronze badges
Same thing with IIS Express 10.0 after upgrading Windows 7 to Windows 10.
Solution: go to IIS and enable all disabled websites and reinstall ASP.NET Core.
answered Jul 22, 2016 at 11:14
1_bug1_bug
5,3374 gold badges49 silver badges57 bronze badges
Also check the address bar and make sure the page is in the right location.
This error can be returned instead of the 404 (Page not found). In my case, it was a bad link on the page that didn’t have a subfolder included.
answered Dec 3, 2015 at 21:15
Tony L.Tony L.
16.8k8 gold badges68 silver badges65 bronze badges
I was having this problem when cleaning up my IIS on dev machine, and I had somehow created a virtual folder for a subfolder of my actual development web that I couldn’t clear and was creating conflicts.
To clear it I had to use
C:WindowsSystem32inetsrvappcmd.exe list vdir
and then individually remove the problem virtual directories using
C:WindowsSystem32inetsrvappcmd.exe delete app /app.name:"Default Web Site"/{name of virtual directory}
answered Dec 2, 2019 at 10:23
SiemsenSiemsen
1991 gold badge3 silver badges13 bronze badges
For me the solution is to change Enable 32-bit Applications to False
None of the answers worked for me. So I’d like to share what I found after hours of research..
Keep seeing this message from event logs: The Module DLL C:Windowssystem32RpcProxyRpcProxy.dll failed to load. The data is the error.
Turns out that dll is 64bit and cannot be loaded into 32bit process.
answered Nov 10, 2020 at 15:44
Rohim ChouRohim Chou
7679 silver badges16 bronze badges
You can also try the following.
Right-click on the site and ‘Basic Settings…’
Click on ‘Connect As…’
Click on Specific User and give the new credentials.
Now it should work.
answered Feb 19, 2021 at 9:57
In my case, I had to change my userPass of network because company policies. So, you need to edit your AppPool:
click on Application Pools. Select your pool, ‘advanced Settings…’ go to ‘Process Model’ click on ‘Identity’ and Click on Specific User and give the new credentials.
Dharman♦
29.3k21 gold badges80 silver badges131 bronze badges
answered Apr 7, 2021 at 8:40
This might be because of number of connections to the database. I had such a situation and so, wrote a de-constructor and killed db open connection and it resolved.
answered Feb 27, 2014 at 12:34
1
Как и любая проблема с доступом к интернет-ресурсам, ошибка 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 и готовы поделиться своим опытом в комментариях!
Errors happen – there’s some unexpected maintenance, a bug that went unnoticed, or a page goes viral and the flood of connections take the server down.
If you’ve been online for any amount of time, no doubt you’ve seen the somewhat vague 503 Service Unavailable error.
In this article we’ll go over HTTP status codes, what the 503 error means, and some possible ways to solve it – both for a site you’re trying to visit and for your own site.
An overview of HTTP status codes
Servers that host web pages listen for requests from web browsers or devices, also known as clients. The server then uses a bunch of different status codes to communicate back.
These status codes are organized into different classes, which is indicated by the first number of the status code:
- 1xx: Information – the server is still processing the request
- 2xx: Success – the request succeeded and the server responds with the page or resource
- 3xx: Redirection – the page or resource has moved and server will respond with its new location
- 4xx: Client error – there is an error in the request from the browser or device
- 5xx: Server error – there is an error with the server
The last two digits of each HTTP status code represent a more specific status for each class. For example, 301 means that a page or resource has moved permanently, while 302 means the move is temporary.
Check out this page for a list of common HTTP status codes and their meaning: https://en.wikipedia.org/wiki/List_of_HTTP_status_codes
Most status codes go by totally unnoticed, which is fine because it means everything is working. It’s only when you get to the 4xx-5xx range that you might notice a status code because you’ll see a page like this:
Now that you have a basic understanding of HTTP status codes, let’s dig a bit deeper into the 503 Service Unavailable error.
What does the 503 error code mean?
As mentioned above, 5xx status codes mean there’s a problem with the server itself.
A 503 Service Unavailable error means that the page or resource is unavailable. There are many reasons why a server might return a 503 error, but some common reasons are maintenance, a bug in the server’s code, or a sudden spike in traffic that causes the server to become overwhelmed.
The message that’s sent with the 503 error can vary depending on server it’s coming from, but here are some of the common ones you’ll see:
— 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.Source
Whatever the reason for the 503 error, it’s usually temporary – the server will restart, traffic will die down, and the issue will resolve itself.
How to solve the 503 Status Unavailable error
When trying to solve a 503 error, there are two general camps.
The first is where you’re an end user, and you’re trying to visit a site that you don’t own. In the second, you own the site, and it’s throwing 503 errors to people who are trying to visit.
The method to solve 503 errors is different depending on which group you fall into. Let’s take a look at some things you can do as an end user if you see a 503 error.
How to solve a 503 Status Unavailable error as an end user
Since 5xx status codes mean that the error is on the server-side, there isn’t a lot you can do directly.
Even though 503 errors are usually temporary, there are some things you can do while you wait.
#1: Refresh the page
Sometimes the error is so temporary that a simple refresh is all it takes. With the page open, just press Ctrl — R on Windows and Linux, or Cmd — R on macOS to refresh the page.
#2: See if the page is down for other people
The next thing you can do is use a service like Is It Down Right Now? or Down For Everyone Or Just Me to see if other people are getting the same error.
Just go to either of those sites and enter in the URL for the page you’re trying to visit.
The service will ping the URL you entered to see if it gets a response. Then it’ll show you some cool stats and graphs about the page:
If you scroll down a bit you’ll see some comments from other people. Often people will give their general location and other data, so this can be a good way to determine if the error is just affecting certain regions or specific devices.
#3: Restart your router
Sometimes the issue has to do with a DNS server failure.
DNS stands for Domain Name System, and they basically act as translators between IP addresses and human readable URLs.
For example, you can visit Google by entering its long IP address directly (172.217.25.206), or you can just enter in the URL, www.google.com.
It’s a DNS, often hosted on a server, that handles all that behind the scenes.
All of that is to say, many routers cache responses from DNS servers (www.google.com <==> 172.217.25.206). But sometimes this cache can get corrupted and cause errors.
An easy way to reset or «flush» the cache is to restart your router. Just unplug your router for about 5 seconds, then plug it back in again.
It should restart after a minute and all of your devices should reconnect automatically. Once they do, try visiting the site again.
How to solve a 503 Status Unavailable error as the site’s owner
If you are the owner/developer of the site that’s returning 503 errors, there’s a bit more you can do to diagnose and resolve the issue.
Here are some general tips to get you started:
#1: Restart the server
Development is tough – even a simple static page can have so many moving parts that it can be difficult to pin down what’s causing the 503 error.
Sometimes the best thing to do is to restart the server and see if that fixes the issue.
The exact method of restarting your server can vary, but usually you can access it from your provider’s dashboard or by SSH’ing into the server and running a restart command.
The server should restart after a couple of minutes. If you’ve configured everything to run automatically on boot, you can visit your site and see if it’s working.
#2: Check the server logs
The next thing to do is check the logs.
The location of the server logs can vary depending on what service you’re running, but they’re often found in /var/log/...
.
Take a look around that directory and see if you can find anything. If not, check the manual for your programs by running man program_name
.
#3: Check if there’s ongoing automated maintenance
Some service providers offer automated package updates and maintenance. Normally this is a good thing – they usually occur during downtime, and help make sure everything is up-to-date.
Occasionally 503 errors are due to these scheduled maintenance sessions.
For example, some hosting providers that specialize in WordPress hosting automatically update WP whenever there’s a new release. WordPress automatically returns a 503 Service Unavailable error whenever it’s being updated.
Check with your service providers to see if the 503 error is being caused by scheduled maintenance.
#4: Check your server’s firewall settings
Sometimes 503 Service Unavailable errors are cause by a misconfigured firewall where connections can get through, but fail to get back out to the client.
Your firewall might also need special settings for a CDN, where multiple connections from a small handful of IP addresses might be misinterpreted as a DDoS attack.
The exact method of adjusting your firewall’s settings depends on a lot of factors. Take a look at your pipeline and your service provider’s dashboards to see where you can configure the firewall.
#5: Check the code
Bugs, like errors, happen. Try as you might, it’s impossible to catch them all. Occasionally one might slip through and cause a 503 error.
If you’ve tried everything else and your site is still showing a 503 Service Unavailable error, the cause might be somewhere in the code.
Check any server-side code, and pay special attention to anything having to do with regular expressions – a small regex bug is what caused a huge spike in CPU usage, rolling outages, and about three days of panic for us at freeCodeCamp.
Hopefully you’ll be able to track down the culprit, deploy a fix, and everything will be back to normal.
In summary
That should be everything you need to know about 503 Service Unavailable errors. While there’s usually not much you can do when you see a 503 error, hopefully some of these steps will help the next time you encounter one.
Stay safe, and happy refreshing-until-it-works
Learn to code for free. freeCodeCamp’s open source curriculum has helped more than 40,000 people get jobs as developers. Get started
I’m really new to setting up web servers in general. I’ve got IIS 8 on Windows 8, and I’m trying to set up a little site locally, while doing some development. In IIS I choose Add Site, give a name, points to a location where I have a index.html file (I’ve tried different locations, latest in a c:inetpubwwwroottest -folder) and otherwise use all default settings. However, when I try to browse to localhost I get
HTTP Error 503. The service is unavailable.
I’ve verified the pool is started, and I’ve given IIS_IUSRS Full Control on the target folder
I’ve search around but not found anything that solved my issue, and there’s nothing helpfull in the EventLog or in the C:WindowsSystem32LogFilesHTTPERR folder
Could anyone tell me what’s wrong?
weir
4,4322 gold badges27 silver badges41 bronze badges
asked Nov 10, 2012 at 14:33
4
It could be that the user identity is outdated, especially if you’ve tried starting a stopped app pool and the next request again fails.
In IIS, go to the Application Pools under the Server, then find the correct Application Pool for your web site, and click on it. On the Advanced Settings menu to the right, select Identity and change it and enter new user and password. Click on your Application Pool again, and select Recycle to restart it.
You can also try looking at the error message in Event Viewer, under Windows Logs, Application, Details tab.
Broots Waymb
4,6553 gold badges30 silver badges51 bronze badges
answered Oct 30, 2013 at 13:02
live-lovelive-love
46.3k22 gold badges227 silver badges197 bronze badges
8
Other answers are fine. But in my case, I was working on a Windows box that already was running some old IIS, IISExpress or any other web site. What happened is urls ACLs where reserved somehow in the system. So, you might want to check this.
Here is the console command to dump all URL acls:
netsh http show urlacl
Check what’s returned here, and if anything matches the url you are testing, here is the command to delete one URL acl (for example):
netsh http delete urlacl url=http://localhost:2018/
(beware to carefully note what you do here in case it was not related to the original problem)
answered Jan 16, 2015 at 14:11
Simon MourierSimon Mourier
128k20 gold badges246 silver badges291 bronze badges
5
In my case the problem was the DefaultAppPool. I changed the «Load User Profile» to false and now it works. However, I don’t know if there are side effects to this.
Further reading on setting the Load User Profile option: What exactly happens when I set LoadUserProfile of IIS pool?
TylerH
20.5k62 gold badges75 silver badges97 bronze badges
answered Apr 18, 2014 at 16:54
2
Check your application’s respective Application Framework Pool — it could be stopped. If it is, start it and check again.
If you’re still experiencing issues you can also check out Event Viewer to find the cause of that error in order to troubleshoot more.
Robotnik
3,5452 gold badges32 silver badges48 bronze badges
answered Oct 25, 2013 at 10:20
ScoolsamScoolsam
5714 silver badges3 bronze badges
1
If the app pool is running under some specific user identity, then go to the advanced settings and update the username and password again to ensure they are correct.
TylerH
20.5k62 gold badges75 silver badges97 bronze badges
answered Aug 16, 2013 at 15:17
0
If the app pool immediately stops after you start it and your event log shows:
The worker process for application pool ‘APP_POOL_NAME’ encountered an
error ‘Cannot read configuration file ‘ trying to read configuration
data from file ‘?’, line number ‘0’. The data field contains
the error code.
… you may experiencing a bug that was apparently introduced in the Windows 10 Fall Creators Update and/or .Net Framework v4.7.1. It can be resolved via the following workaround steps, which are from this answer to the related question Cannot read configuration file ‘ trying to read configuration data from file ‘\?<EMPTY>’, line number ‘0’.
- Go to the drive your IIS is installed on, eg.
C:inetpubtempappPools
- Delete the directory (or virtual directory) with the same name as your app pool.
- Recycle/Start your app pool again.
I have reported this bug to Microsoft by creating the following issue on the dotnet GitHub repo: After installing 4.7.1, IIS AppPool stops with «Cannot read configuration file».
EDIT
Microsoft responded that this is a known issue with the Windows setup process for the Fall Creators Update and was documented in KB 4050891, Web applications return HTTP Error 503 and WAS event 5189 on Windows 10 Version 1709 (Fall Creators Update). That article provides the following workaround procedure, which is similar to the one above. However, note that it will recycle all app pools regardless of whether they are affected by the issue.
- Open a Windows PowerShell window by using the Run as administrator
option.- Run the following commands:
Stop-Service -Force WAS
Remove-Item -Recurse -Force C:inetpubtempappPools*
Start-Service W3SVC
answered Nov 27, 2017 at 15:33
weirweir
4,4322 gold badges27 silver badges41 bronze badges
1
Or if none of the current solutions work, look in your website’s directory for a file called app_offline.htm
. That basically tells IIS that your site is unavailable and to show this page instead.
To fix it, either delete it or rename it to app_offline.htm.bak
.
In my case, I added it while showing a colleague how to use that to prevent traffic to the site temporarily and then forgot that I did that on my box. Sigh.
answered Oct 15, 2015 at 14:50
HallmanacHallmanac
5292 gold badges8 silver badges14 bronze badges
0
Start by looking in Event Viewer, either under the System or the Application log.
In my case the problem was that no worker process could be started for the App Pool because its configuration file couldn’t be read — I had included an extra ‘.’ at the end of its name.
answered Mar 22, 2013 at 15:36
Samuel JackSamuel Jack
32.3k16 gold badges117 silver badges155 bronze badges
It is possible that your domain requires the account used for running the AppPool to have batch logon rights. In which case you will see this same error message. The way you can tell if that is the case, is by looking at the System events in the Event Viewer. There should be an event saying that the account being used with the App Pool has either ‘the wrong password or does not have batch logon rights’.
This is why developers quite often use IIS Express on their development machine, since it by passes the batch logon rights issue.
answered Jan 30, 2013 at 14:56
Hashim AkhtarHashim Akhtar
7772 gold badges10 silver badges16 bronze badges
I ran into the same issue, but it was an issue with the actual site settings in IIS
.
Select Advanced Settings...
for your site/application and then look at the Enabled Protocols
value. For whatever reson the value was blank for my site and caused the following error:
HTTP Error 503. The service is unavailable.
The fix was to add in http
and select OK
. The site was then functional again.
answered Oct 17, 2013 at 20:31
atconwayatconway
20.3k28 gold badges153 silver badges226 bronze badges
2
For my case, My Default Application Pool was offline.
To troubleshoot the problem, I checked the IIS logs located in C:WindowsSystem32LogFileHTTPERR. Scroll down to the most recent error logs, this will show you problems with IIS if any.
My Error was «503 1 AppOffline DefaultPool»
Solution
- Open IIS Manager
- Click on Application Pools, this lists all application pool to your right.
- Check if the application pools hosting your api or site has a stop sign on it. If so, right click the application pool and click start.
- Try again to access your service from the client
Ryan M♦
17.3k30 gold badges60 silver badges71 bronze badges
answered Jun 22, 2018 at 14:54
mut tonymut tony
3377 silver badges9 bronze badges
Check Event Viewer — Windows — Application. If there is a red Error line made from IIS-W3SVC-WP and the message is like The Module DLL C:Windowssystem32inetsrvrewrite.dll failed to load. The data is the error. then you are missing some Windows Setup features.
In Windows Server 2012 go to Server Manager, Add Roles and Features, Web Server (IIS) and add the matching feature. Usually, most of the Application Development section is installed. Here is a complete list of IIS features and their associated DLL to help in diagnosis.
After going through a few iterations of that I ended on the error message above regarding «rewrite.dll». This led to a direct download and install of Microsoft URL Rewrite tool. Finally all websites came to life.
answered Nov 10, 2014 at 19:25
SushiGuySushiGuy
1,49317 silver badges20 bronze badges
2
Our server ran out of disk space on Sunday afternoon which led to an application suddenly failing and returning HTTP error 502. The logs were empty so it had to be something that was occurring before IIS even did anything.
A swift look at the event viewer(WIN+R > eventvwr
) exposed the issue.
It’s a good idea to filter out the output of the System and Application windows to WAS since it can get pretty verbose in there.
The application depended on another one which was disabled. Therefore keep in mind an application can go down indirectly if one of it’s dependent processes has gone down. We simply re-enabled the .NET application pool and our other application started running normally again.
answered Feb 27, 2017 at 17:05
Patrick.SEPatrick.SE
4,3635 gold badges33 silver badges44 bronze badges
If you have IIS URL Rewriting installed it could be to do with that. I suffered issues after a Windows 10 Update.
This StackOverflow post helped me.
Go to Windows Control Panel
> Programs and Features
> IIS URL Rewrite Module 2
> Repair
.
answered Apr 25, 2016 at 11:23
ᴍᴀᴛᴛ ʙᴀᴋᴇʀᴍᴀᴛᴛ ʙᴀᴋᴇʀ
2,7341 gold badge26 silver badges38 bronze badges
1
In my case, the problem was that another application was using the port that I had bound to my web site.
I found it by running the following command from a command line, which lists all of the listening ports and the executable involved:
netstat -b
answered Mar 25, 2016 at 21:23
AvalanchisAvalanchis
4,4713 gold badges37 silver badges47 bronze badges
If you have McAfee HIPS and if you see the following error in event viewer application log:
The Module DLL C:WindowsSystem32inetsrvHipIISEngineStub.dll failed to load.
The data is the error.
Then this workaround on McAfee.com resolved the issue in my case.
Quote from the page:
- Click Start, Run, type explorer and click OK.
- Navigate to: %windir%system32inetsrvconfig
- Open the file applicationHost.config as Administrator for editing in Notepad.
Edit the <globalModules> section and remove the following line:
<add name=»MfeEngine» image=»%windir%System32inetsrvHipIISEngineStub.dll» />Edit the <modules> section and remove the following line:
<add name=»MfeEngine» />- After you have finished editing the applicationHost.config file, save the file, then restart the IIS server using iisreset or by restarting the system.
Stacked
6,6246 gold badges55 silver badges73 bronze badges
answered Dec 28, 2014 at 15:01
Orhan CelikOrhan Celik
1,49315 silver badges12 bronze badges
0
Actually, in my case https://localhost was working, but http://localhost gave a HTTP 503 Internal server error. Changing the Binding of Default Web Site in IIS to use the hostname localhost instead of a blank host name.
tname for http binding
answered Aug 30, 2018 at 14:58
Tore AurstadTore Aurstad
2,94224 silver badges21 bronze badges
This could also happen if any recent installs or updates happened with .NET framework and/or ASP.NET. If you are unsure of what happened recently and if all your apps use ASP.NET version 4, you can try reset them by running the following commands in command prompt in administrator mode.
cd C:WindowsMicrosoft.NETFramework64v4.0.30319
aspnet_regiis -i
This makes sure to install or reinstall ASP.NET 4 and updates existing applications to use ASP.NET 4 version of the app pool. It updates both IIS Classic and Integrated mode handlers and script mappings in the IIS metabase. It also recreates ASP.NET v4.0 and ASP.NET v4.0 Classic app pools, and sets .NET framework 4 to DefaultAppPool and Classic .NET app pools.
answered Mar 31, 2016 at 15:59
Prabu ArumugamPrabu Arumugam
1,9192 gold badges15 silver badges19 bronze badges
I changed the port from 80 to 8080, that’s why this error occur. I write localhost/ in search bar then this error occur. My problem is resolved by writing localhost:8080/ in the search then local host open.
answered Aug 1, 2019 at 5:22
1
This happened to me on a server on our intranet. After browsing through blog posts and Windows logs, it turned out that a few days before Christmas 2015 (related to a Windows Update?) my web site application pool wanted to create a config file in folder c:inetpubtempappPools, but access to this folder was restricted. This caused the application pool to be disabled.
After adding Full control to Everyone on this temp folder, I restarted the Windows Process Activation Service and everything went online again.
If I’d been a little more elegant, it would probably had been enough to grant the AppPool user full control to the folder, but I never seem to remember how the app pool name and app pool user relates to eachother…
answered Jan 20, 2016 at 15:41
Daniel PerssonDaniel Persson
2,1511 gold badge17 silver badges24 bronze badges
Same thing with IIS Express 10.0 after upgrading Windows 7 to Windows 10.
Solution: go to IIS and enable all disabled websites and reinstall ASP.NET Core.
answered Jul 22, 2016 at 11:14
1_bug1_bug
5,3374 gold badges49 silver badges57 bronze badges
Also check the address bar and make sure the page is in the right location.
This error can be returned instead of the 404 (Page not found). In my case, it was a bad link on the page that didn’t have a subfolder included.
answered Dec 3, 2015 at 21:15
Tony L.Tony L.
16.8k8 gold badges68 silver badges65 bronze badges
I was having this problem when cleaning up my IIS on dev machine, and I had somehow created a virtual folder for a subfolder of my actual development web that I couldn’t clear and was creating conflicts.
To clear it I had to use
C:WindowsSystem32inetsrvappcmd.exe list vdir
and then individually remove the problem virtual directories using
C:WindowsSystem32inetsrvappcmd.exe delete app /app.name:"Default Web Site"/{name of virtual directory}
answered Dec 2, 2019 at 10:23
SiemsenSiemsen
1991 gold badge3 silver badges13 bronze badges
For me the solution is to change Enable 32-bit Applications to False
None of the answers worked for me. So I’d like to share what I found after hours of research..
Keep seeing this message from event logs: The Module DLL C:Windowssystem32RpcProxyRpcProxy.dll failed to load. The data is the error.
Turns out that dll is 64bit and cannot be loaded into 32bit process.
answered Nov 10, 2020 at 15:44
Rohim ChouRohim Chou
7679 silver badges16 bronze badges
You can also try the following.
Right-click on the site and ‘Basic Settings…’
Click on ‘Connect As…’
Click on Specific User and give the new credentials.
Now it should work.
answered Feb 19, 2021 at 9:57
In my case, I had to change my userPass of network because company policies. So, you need to edit your AppPool:
click on Application Pools. Select your pool, ‘advanced Settings…’ go to ‘Process Model’ click on ‘Identity’ and Click on Specific User and give the new credentials.
Dharman♦
29.3k21 gold badges80 silver badges131 bronze badges
answered Apr 7, 2021 at 8:40
This might be because of number of connections to the database. I had such a situation and so, wrote a de-constructor and killed db open connection and it resolved.
answered Feb 27, 2014 at 12:34
1
Время прочтения
7 мин
Просмотры 27K
Работа в поддержке хостинга в основном однотипная, большинство запросов от клиентов решаются по проработанной схеме, но иногда всё же приходится сталкиваться с нетривиальными проблемами. Тогда главная задача инженера — найти тот самый — единственно верный путь, который приведёт к её решению. В этой статье хочу рассказать о том, как мы столкнулись с плавающей ошибкой «HTTP Error 503. Service Unavailable» на нашем shared-хостинге, как пытались её отловить, провели диагностику и получили неожиданный финал.
Начало
Хостинг предоставляет пользователям типичный стек Linux + Apache + Mysql + PHP и оболочку для управления. В нашем случае это ISP Manager 5 business на базе Centos 7 с конвертацией в CloudLinux. Со стороны административной части, CloudLinux предоставляет инструменты для управления лимитами, а так же PHP-селектор с различными режимами работы (CGI, FastCGI, LSAPI).
В этот раз к нам обратился клиент со следующей проблемой. Его сайт на движке WordPress периодически начал отдавать 503 ошибку, о чём он нам и сообщил.
Коды ответа, начинающиеся с 50х, относятся к проблемам на стороне сервера. Это могут быть проблемы как самого сайта, так и веб-сервера, который их обслуживает.
Типичные ситуации, при которых мы получаем следующие ошибки:
- 500 Internal Server Error — довольно часто связана либо с синтаксическими ошибками в коде сайта, либо с отсутствующими библиотеками / не поддерживаемой версией PHP. Так же могут быть проблемы с подключением к базе данных сайта или неверными правами на файлы / каталоги
- 502 Bad Gateway — например, если Nginx ссылается на неправильный порт веб-сервера Apache или процесс Apache по какой-то причине перестал работать
- 504 Gateway Timeout — ответ от Apache не был получен в течение заданного в конфигурации веб-сервера времени
- 508 Resource limit is reached — превышен лимит, выделяемых пользователю ресурсов
В данном списке приведены лишь некоторые, наиболее распространённые случаи. Также стоит отметить, что при превышении лимитов пользователь может получить как 500, так и 503 ошибку.
При выполнении диагностики данных ошибок, первым делом проверяем журналы веб-сервера. Обычно, этого достаточно, чтобы определить виновника и исправить проблему.
Касаемо 503 ошибки в нашем случае, в логах мы видели запись:
[lsapi:error] [pid 49817] [client x.x.x.x:6801] [host XXX.XX] Error on sending request(GET /index.php HTTP/1.0); uri(/index.php) content-length(0): ReceiveAckHdr: nothing to read from backend (LVE ID 8514), check docs.cloudlinux.com/mod_lsapi_troubleshooting.html
На основании только этого лога, определить в чём может быть проблема не представлялось возможным.
Первичная диагностика
Изначально, мы проверили статистику превышения лимитов пользователем. Незначительные превышения были зафиксированы за предыдущие дни, но ошибки в журналах были свежие, более того они появлялись в журнале с периодичностью от одной до нескольких минут.
Так же мы изучили рекомендации CloudLinux, по приведённой в журналах ошибок ссылке.
Изменение каких-либо параметров результата не принесло.
Сайт использовал базу данных на сервере Mysql 5.7, который работает на этом же сервере в контейнере Docker. В логах контейнера присутствовали сообщения:
[Note] Aborted connection 555 to db: 'dbname' user: 'username' host: 'x.x.x.x' (Got an error reading communication packets)
Как раз, среди этих сообщений были сообщения о прерванном подключении исследуемого сайта. Это дало предположение, о том, что подключение к СУБД выполняется некорректно. Для проверки мы развернули копию сайта на тестовом домене, сконвертировали базу данных сайта под нативную в Centos 7 версию СУБД 5.5.65-MariaDB. На тестовом сайте выполнили несколько сотен запросов с помощью утилиты curl. Ошибку воспроизвести не удалось. Но этот результат был предварительным и после конвертации БД на рабочем сайте проблема так и осталась.
Таким образом, проблема некорректного подключения к СУБД была исключена.
Следующим предположением было проверить — нет ли проблем с самим сайтом. Для этого подняли отдельный виртуальный сервер, на нём подняли максимально схожее окружение. Единственное существенное отличие — отсутствие CloudLinux. На тестовом сервере проблему воспроизвести не удалось. Итак, мы определили, что в коде сайта всё в порядке. Тем не менее, пробовали так же отключать плагины WordPress, но проблема так же сохранялась.
В результате, пришли к тому, что проблема на нашем хостинге.
В ходе анализа журналов других сайтов было обнаружено, что проблема наблюдается на многих из них. Порядка 100 шт. на момент проверки:
/var/www/httpd-logs# grep -Rl "ReceiveAckHdr: nothing to read from backend" ./ | wc -l
99
В ходе тестирования обнаружили, что только что установленная чистая CMS WordPress также периодически выдаёт ошибку 503.
Примерно за 2 месяца до этого мы проводили работы по модернизации сервера, в частности изменили режим работы Apache с Worker на Prefork, с целью получить возможность использовать PHP в режиме LSAPI, вместо медленного CGI. Было предположение, о том, что это могло повлиять, либо требуются какие-то дополнительные настройки Apache, но вернуть обратно режим Worker мы уже не могли. В ходе изменения режима работы Apache выполняется изменение всех конфигов сайтов, процесс не быстрый и не всё могло пройти гладко.
Корректировка настроек Apache так же не дала желаемого результата.
Попутно искали схожие проблемы в поисковых системах. На одном из форумов участники утверждали, что проблема у хостера и нужно его менять, если проблему не решают. Звучит не очень оптимистично, когда ты находишься с другой стороны, но и клиента понять можно. Зачем ему нерабочий хостинг.
На данном этапе мы собрали имеющуюся информацию и результаты проведённых работ. С ними обратились в поддержку CloudLinux.
Детальная диагностика
В течение нескольких дней сотрудники поддержки CloudLinux вникали в проблему. В основном рекомендации были относительно установленных лимитов пользователей. Этот вопрос мы так же проверяли. При отключенных лимитах (Опция CageFS для пользователя) и с включенными лимитами в режиме PHP как модуль Apache проблема не наблюдалась. Исходя из этого, было сделано предположение, что каким-то образом оказывает влияние CloudLinux. В итоге, к концу недели запрос был эскалирован на 3-ий уровень поддержки, но решения пока не было.
Попутно изучали документацию Apache по режимам работы CGI и LSAPI, подняли второй экземпляр Apache на сервере хостинга на другом порту с тестовым сайтом, исключили влияние Nginx, отправляя запросы напрямую к Apache и получая те же коды ошибок.
Сдвинуться с мёртвой точки помогла документация LSAPI, как раз по диагностике 503 ошибки:
www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:php:503-errors
В секции Advanced Troubleshooting предлагается выполнять трассировку найденных в системе процессов:
while true; do if mypid=`ps aux | grep $USERNAME | grep lsphp | grep $SCRIPTNAME | grep -v grep | awk '{print $2; }' | tail -1`; then strace -tt -T -f -p $mypid; fi ; done
Команда была доработана, с целью записи всех процессов в файлы с указанием их идентификаторов.
При просмотре файлов трассировок, мы видим в некоторых одинаковые строки:
cat trace.* | tail
...
47307 21:33:04.137893 --- SIGHUP {si_signo=SIGHUP, si_code=SI_USER, si_pid=42053, si_uid=0} ---
47307 21:33:04.140728 +++ killed by SIGHUP +++
...
Если взглянуть на описание структуры сигналов, отправляемых процессами, то увидим, что
pid_t si_pid; /* Sending process ID */
Указывает на идентификатор процесса, отправившего сигнал.
На момент изучения трассировок, процесса с PID 42053 в системе уже нет, поэтому в процессе захвата трассировок решили отслеживать так же процессы, отправившие сигнал SIGHUP.
Под спойлером описаны действия, которые позволили определить что это за процесс, а так же получить его трассировку и дополнительную информацию, о том, каким процессам он отправляет сигнал SIGHUP.
Методика трассировки
Консоль 1.
tail -f /var/www/httpd-logs/sitename.error.log
Консоль 2.
while true; do if mypid=`ps aux | grep $USERNAME | grep lsphp | grep "sitename" | grep -v grep | awk '{print $2; }' | tail -1`; then strace -tt -T -f -p $mypid -o /tmp/strace/trace.$mypid; fi ; done
Консоль 3.
while true; do if mypid=`cat /tmp/strace/trace.* | grep si_pid | cut -d '{' -f 2 | cut -d'=' -f 4 | cut -d',' -f 1`; then ps -aux | grep $mypid; fi; done;
Консоль 4.
seq 1 10000 | xargs -i sh -c "curl -I http://sitename/"
Ждём пока в консоли 1 появятся сообщения, при этом в консоли 4 видим статус запроса с кодом ответа 503, прерываем выполнение в консоли 4.
В итоге, получили название процесса /opt/alt/python37/bin/python3.7 -sbb /usr/sbin/cagefsctl --rebuild-alt-php-ini
Данный процесс выполнялся в системе с периодичностью раз в минуту.
Делаем трассировку нескольких процессов cagefsctl, чтобы отследить хотя бы один от начала до конца:
for i in `seq 1 100`; do strace -p $(ps ax | grep cagefsctl | grep rebuild-alt-php-ini | grep -v grep | awk '{print $1}') -o /tmp/strace/cagefsctl.trace.$(date +%s); done;
Далее изучаем что он делал, например:
cat /tmp/strace/cagefsctl.trace.1593197892 | grep SIGHUP
Так же были получены идентификаторы процессов, которые были завершены сигналом SIGHUP. Завершённые процессы были процессами PHP, выполняющимися в данный момент.
Полученные данные были переданы в поддержку CloudLinux с целью уточнить легитимность данного процесса и должен ли он работать с такой периодичностью.
Позже получили ответ, что работа команды /usr/sbin/cagefsctl --rebuild-alt-php-ini
выполняется корректно, единственный нюанс в том, что команда выполняется слишком часто. Обычно вызывается при системном обновлении или изменении параметров PHP.
Единственная зацепка в данном случае осталась — проверить, кто является родительским процессом cagefsctl.
Результат не заставил себя долго ждать и какого же было наше удивление — родительским процессом для cagefsctl являлся процесс ispmgrnode. Это было немного странно, потому что уровень журналирования для ISP Manager был задан максимальным и в ispmgr.log не увидели вызов cagefsctl.
Теперь данных было достаточно, чтобы обратиться и в поддержку ISP System.
Итоги
Проблема была спровоцирована после выполнения обновления ISP Manager. В целом, обновление ISP Manager — штатная ситуация, но она привела к запуску процесса синхронизации, который завершался с ошибкой и перезапускался ежеминутно. Процесс синхронизации вызывал за собой процесс cagefsctl, который в свою очередь завершал процессы PHP.
Причиной зависания процесса синхронизации стали проведённые на хостинге работы по модернизации оборудования. За несколько месяцев до возникновения проблемы, в сервер был установлен PCI-e NVMe-накопитель, создан раздел XFS и смонтирован в каталог /var. На него были перенесены в том числе и файлы пользователей, но не обновились дисковые квоты. Опций монтирования было не достаточно, требовалось так же изменить тип файловой системы в параметрах ISP Manager, т.к. она вызывает команды обновления дисковых квот. Для Ext4 и XFS эти команды отличаются.
Таким образом, проблема дала о себе знать спустя несколько месяцев после проведения работ.
Выводы
Мы сами создали проблему, но это было не ясно до последнего момента. На будущее, будем стараться учесть как можно больше нюансов. Благодаря помощи более подготовленных коллег из поддержки CloudLinux и ISP System, проблема была решена. Теперь наш хостинг работает стабильно. А нами был получен опыт, который пригодится нам в будущей работе.
P.S.: Надеюсь, Вам было интересно ознакомиться с материалом статьи, а кому-нибудь она поможет быстрее решить подобную проблему.
Imagine someone searches for a topic and finds your website on page one of Google. When they click through to your website, though, their eyes land on a bland webpage that says «Service Unavailable».
What do you think they’ll do when they find your website on Google again? Odds are, they’ll skip over it and click on the next link. If visitors are looking for answers and you’re promising them those answers, but you can’t deliver because something’s wrong with your website, they’ll lose trust in your brand.
Unfortunately, if your website experiences a 503 Service Unavailable Error, there’s no silver bullet solution. You have to investigate what’s actually causing the issue, because even though these types of errors indicate what happened to your website, they don’t tell you why it happened.
To help you fix your 503 Service Unavailable Error and avoid losing potential customers, check out our guide on what exactly the issue is and its most common solutions.
A 503 Service Unavailable Error is an HTTP response status code that indicates your web server operates properly, but it can’t handle a request at the moment. Since it’s just a generic error message, it’s difficult to pinpoint the issue’s exact cause.
When your website is experiencing a 503 Service Unavailable Error, your site’s visitors will land on an error page. Fortunately, Airbrake recommends five common solutions for troubleshooting most 503 Service Unavailable Errors.
How to Fix an HTTP Error 503
- Reboot your server.
- Check to see if your web server is going through maintenance.
- Fix faulty firewall configurations.
- Sift through your server-side logs.
- Comb through your website’s code to find bugs.
1. Restart your server.
Sometimes, there will be congestion in the server chain that hosts your website. One of the most effective ways to open up and refresh it is to simply restart your web server. If your website is hosted on multiple servers, make sure you restart all of them to get it running again.
2. Check to see if your web server is going through maintenance.
Most web servers shut down when they’re going through maintenance. If you can access your server’s administration settings, check the configuration options to see when automatic maintenance sessions are scheduled. If you’d rather have complete control over your server’s maintenance, you can disable these automatic updates in the configuration options, too.
3. Fix faulty firewall configurations.
Your firewall is your website’s gatekeeper, protecting your site from malicious visitors or distributed denial-of-service (DDoS) attacks. Sometimes, a faulty firewall configuration will cause your firewall to deem requests from a content delivery network as an attack on your server and reject them, resulting in a 503 Service Unavailable Error. Check your firewall configuration to pinpoint and fix the issue.
4. Sift through your server-side logs.
There are two types of server-side logs — applications logs and server logs. Application logs recount your website’s entire history, letting you see the web pages requested by visitors and the servers it connected to. Server logs provide information about the hardware running your server, revealing details about its health and status. Sift through both types of server-side logs to uncover any alarming information about your server or website.
5. Comb through your website’s code to find bugs.
If there’s a mistake in your website’s code, your web server might not be able to correctly answer requests from a content delivery network. Comb through your code to find bugs or copy your code into a development machine. It’ll perform a thorough debug process that will simulate the exact situation your 503 Service Unavailable Error occurred in and allow you to find the exact moment things went wrong.
Any time there’s an error on your site, it’s important to fix it as soon as you can. If customers get errors, they probably won’t come back to your page.
Editor’s note: This post was originally published in January 2019 and has been updated for comprehensiveness.
Every day, millions of internet users see HTTP (HyperText Transfer Protocol) Error 503. So, when you encounter HTTP Error 503, the website or web application you are trying to access is currently unavailable to serve you for some reason. There are numerous reasons for an HTTP Error 503, such as an error in the underlying software or hardware, or even malicious activity on the part of someone who owns or operates the site. However, as per the web standards, error 503 is returned mostly when the server is either down for maintenance or overloaded.
The most appropriate way is to ascertain what happened and try to fix it as quickly as possible. However, it is not obvious to know what to do in such a situation. Therefore, in this blog, we’ll investigate what this HTTP error 503 means and the various reasons for it. In addition, you’ll also get suggestions for fixing the problem.
So don’t be concerned – let’s get the blog started!
What is HTTP 503 Error Code?
There might be better times to surf the internet if you get an HTTP 503 error code. The server is overburdened and can’t handle any more requests, which is why this error code appears on the screen. On the other hand, browser problems or out-of-date software may also induce it in certain circumstances.
503 Error Variations:
- 503 Service Unavailable
- 503 Service Temporarily Unavailable
- Error 503 Service Unavailable
- HTTP Error 503
- HTTP Server Error 503
- The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.
How Does an HTTP Error 503 Occur?
One of web users’ most common error messages is HTTP Error 503 (Service Unavailable). Unfortunately, it’s a situation that the user must remedy, almost always due to a server issue. An overloaded server, insufficient resources, or configuration error are all examples of server-side issues.
Since the 503 error only concerns the server side of things, you can safely ignore the client side of things, like HTML, JS, CSS, or any other frontend component.
Ways to Fix an HTTP Error 503
You’ll have to troubleshoot the problem and determine its origin to fix it. However, you can make efforts to lessen the impact of the mistake by following these suggestions:
1. Restart Your Server
Visitors may see a 503 (Service Unavailable) error message when your website is unavailable. This is because the server where your website is hosted is unavailable, which means your website will be unavailable.
You can restart your server to address this issue. This is generally effective at resolving the problem and allowing people to return. However, if the problem persists, ensure that your server has all of the latest upgrades installed and try restarting it again.
Don’t hesitate to approach a hosting company or web host if you need help.
2. Check If Your Web Server is Running into Maintenance
You might get an HTTP 503 error when your web server is down for maintenance. The server is down and unable to serve requests due to this mistake.
If your web server is under maintenance and you want to check if it’s done, try reaccessing the website after it’s completed. Depending on your browser or server’s configuration, you may have to restart it if all of these steps fail.
3. Fix Faulty Firewall Configurations
Firewalls are required for computer and network security, but they may also Report HTTP Error 503.
It’s critical to determine what may be causing this problem and take action to correct it if you’re encountering it. This might consist of disabling any unnecessary services on the firewall that are causing issues or even rebooting your computer or router.
4. Sift Through Your Server-Side Logs
When there is a problem with your website or server, HTTP Error 503 is the most common status code. You’ll have to go through your server-side logs and locate the problem to solve it.
Sometimes, simply fixing the problem is sufficient, but other times you’ll need to contact your hosting provider or utilize a third-party service.
Making sure that server-side errors don’t reoccur is essential – this might mean keeping detailed error logs and using browser add-ons like Google Analytics to monitor web page visits.
How to Solve a 503 Status Unavailable Error as an End User
503 Status Unavailable Error is expected to occur anytime and it may become a hindrance at your work. There are various ways to solve a 503 Status Unavailable Error as an end user. Some of the ways are mentioned below –
- Refresh the page
- See if the page is down for other people
- Restart your Router
- Wait for some time
- Stop Running Processes
Steps to Fix the 503 Error in WordPress (8 Steps)
When attempting to access a WordPress website, you might get the HTTP error 503 (Service Unavailable). This may be because of various factors out of WordPress’s hands. Follow these easy steps to resolve the 503 error:
1. Temporarily Deactivate Your WordPress Plugins
Go to the plugin’s settings page and uncheck the box that says ‘Enabled’ to disable it temporarily. Then, try restarting your WordPress site after you’ve disabled the plugin to see if the problem persists. You’ll have to manually delete or disable the extension from your server if it isn’t working.
2. Deactivate Your WordPress Theme
From the WordPress Theme Repository, deactivate your theme before installing a new one. Also, ensure all your plugins and themes are the latest versions. If these procedures fail, you’ll need to contact your theme’s creator to resolve the problem.
3. Temporarily Disable Your Content Delivery Network (CDN)
You can temporarily disable it if your WordPress site uses a content delivery network (CDN) to see if the error goes away. First, look for the ‘Security’ section on your server’s configuration page. There are several options listed under the heading ‘Configure CDN.’ For now, disable it and see if the problem goes away.
4. Limit the WordPress ‘Heartbeat’ API
Limiting the WordPress’ Heartbeat’ API usage might be your best option if you’re running into 503 errors regularly and need help figuring out the root cause. To do so, there are six simple steps:
Go to Settings > General > Performance and set the Limit HTTP Requests field to 100/day or 500/day, etcetera. Otherwise, your server will only work under heavy load if the configuration is correct or the resources are sufficient.
5. Limit Google’s Crawl Rate
Google’s crawl is a piece of software that collects and organizes information on the Internet in an index to investigate the contents of websites. The crawler travels from site to site and Internet page to page, hunting for fresh material or potential updates of previously explored material.
Another factor that causes 503 errors in WordPress is Google’s maximum crawl rate, which can be avoided by following these steps:
- Upgrade the hosting plan.
- Take a break from the task and do not update anything for a while. You’ll miss visits, but it’s necessary at times.
- The regular use of the internet will return when traffic levels normalize.
- If you have a flood of visitors, optimize WordPress to prevent it from sucking up too many resources and causing a 503 error.
6. Increase Your Server’s Resources
Increasing your server’s resources may be your only option if you cannot resolve the problem using any of the preceding methods. To increase your server’s resources, ask your hosting provider and request additional resources (CPU/memory).
7. Review Your Logs and Enable WP_DEBUG
It may be beneficial to review your logs and enable WP_DEBUG if the problem persists after increasing your server resources. Then, you’ll have more insight into what’s happening inside the machine.
8. Use a VPN
Since there is a chance that the website isn’t just operating in your region, a virtual private network would suffice as a remedy since some sites have separate servers for various nations. You may easily create your VPN using a third-party service.
Conclusion:
Web admins and users commonly encounter HTTP Error 503, a standard error code. The server on which the web page is hosted is unavailable for some reason, which is indicated by this error code. Network problems, server overload, or unannounced server maintenance are the most common causes of this problem.
In most situations, changing the web page’s server location or moving it to a different server fixes the problem immediately. GeeksForGeeks is a fantastic place to begin if you have technical difficulties and need help fixing them!
FAQs on HTTP Error 503 (Service Unavailable):
Q1. What does “503 servers temporarily unavailable” mean?
Ans: The 503 Server Temporarily Unavailable Error means your website is thrown by server overload. Where your websites are hosted is known as a server. For example, you can imagine it as the land on which your home is constructed.
Q2. Is Error 503 user’s fault?
Ans: No, the 503 error is almost never a user’s fault. If you are seeing it in your browser, you should let the website owners know, if you can.
Q3. What is Error 503 backend fetch failed?
Ans: Any browser, including Windows 11, back to Windows XP, macOS, Linux, etc., may experience 503 Service Unavailable errors. Even your smartphone or other non-traditional devices can do it. You may get a 503 in certain circumstances if you have internet access.
Also Read:
- What are HTTP Status Codes?
- How To Troubleshoot Common HTTP Error Codes?
- 10 Most Common HTTP Status Codes
Contents
- Cause of HTTP Error 503
- Rapid-Fail Protection
- Debugging HTTP Error 503
- Fixing HTTP Error 503
- Common 503 substatus codes
- Conclusion
- Author
- Recent Posts
Surender Kumar has more than twelve years of experience in server and network administration. His fields of interest are Windows Servers, Active Directory, PowerShell, web servers, networking, Linux, virtualization, and penetration testing. He loves writing for his blog.
Latest posts by Surender Kumar (see all)
- Extending LVM space in Ubuntu — Thu, Feb 2 2023
- Backup in Proxmox VE — Thu, Jan 26 2023
- Snapshots in Proxmox VE — Wed, Jan 25 2023
Cause of HTTP Error 503
HTTP Error 503 is another very common error you might face with an IIS-hosted website in addition to the 500 – Internal server error.
HTTP Error 503. The service is unavailable
The primary reason for this error is a stopped or disabled application pool. The application pool is the IIS component that initiates a worker process, which then allows the web server to process incoming requests for a website. When something is wrong with the application pool, the web server throws an HTTP Error 503.
Rapid-Fail Protection
There can be various reasons for an application pool failure, such as an unhandled exception in the code, an expired password for the application pool identity, or something else. By default, IIS is configured to disable a malfunctioning application pool if its worker process faces five consecutive crashes within a period of five minutes. This setting is known as Rapid-Fail Protection, which is available under the Advanced Settings of an application pool. This is shown in the following screenshot:
Viewing or modifying the rapid fail protection setting for an application pool
- Enabled—The value True indicates that the rapid-fail protection feature is active, which is the default. Set the value to False to disable it.
- Failure Interval (minutes)—The time interval to specify the number of minutes (by default, 5) to count the failures for a process.
- Maximum Failures—The maximum number of failures that are allowed within the time interval mentioned above (by default, 5).
While troubleshooting an application pool-related problem, you can modify these parameters, if needed.
Debugging HTTP Error 503
To determine the exact reason why the application pool is disabled or stopped, open the Event Viewer, navigate to the System log, and look for error or warning events whose source is Windows Process Activation Service (WAS). WAS is responsible for starting/stopping the application pool and keeping track of worker processes in the IIS.
The following screenshot shows that the application pool is disabled because its identity is invalid:
Checking the system log to identify the cause of application pool failure
If you couldn’t find anything in the System log, take a look in the Application log since the ASP.Net-related exceptions are logged there. As discussed above, when a worker process experiences five fatal errors or exceptions within five minutes, rapid-fail protection kicks in and automatically disables the faulting application pool.
Based on event logs, if you conclude that the reason for application pool failure is a bug in the application code, but you still want to keep the application pool running until your developer fixes it, you could temporarily adjust the behavior of rapid-fail protection, either by increasing the Maximum Failures or the Failure Interval to a higher value. You could even disable this feature by using the following PowerShell command:
(Get-IISAppPool awesomewebsite.com).failure.rapidFailProtection Set-WebConfigurationProperty '//*[@name="awesomewebsite.com"]//failure' -Name rapidFailProtection -Value $False
Viewing and disabling the rapid fail protection for an application pool with PowerShell
Remember that the rapid-fail protection feature is there for the safety of the web server, so disabling it shouldn’t be considered a solution to the problem. Instead, fixing the underlying cause (or bug causing the behavior) in the application code is really important. Anyway, disabling it sometimes comes in handy if developers are taking longer to fix the bug; meanwhile, you want to keep the web application up and running. Once rapid-fail protection is disabled, the web server won’t disable the faulting application pool, and visitors will no longer see HTTP Error 503.
Fixing HTTP Error 503
A simple resolution for HTTP Error 503 is to start the application pool corresponding to your website. If you get an application pool identity-related error or warning, make sure the username and password for the identity are correct. If a custom username is used, make sure its password is not expired. If possible, set the password to never expire for that user.
If the application pool stops repeatedly but there is no application pool identity-related error in the system log, the issue is likely due to some fatal error or unhandled exception in the code. In that case, the application log can give you some useful insights. The following screenshot shows a typical error logged in the application log that occurred due to an unhandled exception:
Checking the application log to identify the cause of application pool failure
If you see such errors or warnings, notify your application developers, and ask them to fix the exception. If needed, share the detailed error message recorded in the event log.
Common 503 substatus codes
The following table covers the common HTTP 503 substatus codes, along with their possible causes and troubleshooting advice:
Status Code | Possible Cause | Troubleshooting Advice |
503.0 | The application pool is unavailable | The application pool is either stopped or disabled. To fix this error, start the application pool corresponding to your website. If it fails repeatedly, check the event log to understand why it is failing. We covered how to fix this error above. |
503.2 | The concurrent request limit has exceeded | The appConcurrentRequestLimit is a serverRuntime attribute that specifies the maximum concurrent requests (with a default value of 5000) that can be queued for application. The 503.2 error indicates that this limit has been exceeded. To resolve this error, you can increase the value using the following command:
%SystemRoot%System32inetsrvappcmd.exe set config /section:serverRuntime /appConcurrentRequestLimit:100000 If you get ERROR ( message:Unknown attribute «appConcurrentRequestLimit». Replace with -? for help. ) while running this command, use the following command instead: %SystemRoot%System32inetsrvappcmd.exe set config /section:system.webserver/serverRuntime /appConcurrentRequestLimit:100000 |
503.3 | The ASP.NET queue is full | The requestQueueLimit attribute specifies the maximum number of requests (with a default value of 1000) that can be queued by the ASP.NET process. When this queue is full, the 503.3 error is returned. To resolve this error, set the Queue Length attribute to a higher value in the application pool’s advanced settings. See this image for reference. Usually, exceeded queue length is a sign of a server unable to keep up with the requests. Therefore, you could use performance counters to understand why the server is struggling. |
503.4 | The FastCGI queue is full | This error occurs when the FastCGI process queue is full. To fix this error, increase the value of the Queue Length attribute for your FastCGI process. To do so, open the IIS Manager, click the server name, and double-click FastCGI Settings. Now, double-click the FastCGI process for the particular PHP version that your application is using, and increase the value of Queue Length. See this image for reference. |
Subscribe to 4sysops newsletter!
Conclusion
You can see that, like most IIS errors, HTTP Error 503 can be fixed with the help of detailed errors and failed request tracing. However, in the event of application pool-related errors, the HTTP.sys driver throws the 503.0 error because the application pool isn’t available to handle the request. Thus, the detailed error or failed request tracing rule is not even triggered. In such situations, you can rely on Windows event logs to troubleshoot.
Ошибки 5XX означают, что есть проблемы со стороны сервера. Например, 500 ошибка значит, что сервер столкнулся с внутренней ошибкой, из-за которой не смог обработать запрос. К ней могут привести неверные директивы в .htaccess или ошибки в скриптах сайта. А ошибка 503 означает, что сервер не может обработать ваш запрос в данный момент. После номера ошибки часто идёт краткое описание. 503 ошибка сервера часто сопровождается фразой «Service Temporarily Unavailable» (сервис временно недоступен). Если на вашем сайте часто встречается 503 ошибка, значит самое время выяснить её причину.
В этой статье мы рассмотрим возможные причины возникновения 503 ошибки на сайте и способы её устранения.
Ошибка 503 Service Unavailable
Что такое ошибка 503 (Service Temporarily Unavailable)
Эта ошибка означает, что сервер не готов обработать запрос в данный момент. Подразумевается, что это временно и нужно повторить попытку позже. Но это не всегда так. HTTP 503 Service Unavailable — это код состояния, который содержится в ответе веб-сервера и показывает, успешно ли выполнен запрос. Коды 5XX принадлежат классу серверных ошибок. В спецификации RFC 7231 указано, что код 503 сообщает о том, что сервер в настоящее время не может обработать запрос из-за временной перегрузки или планового технического обслуживания
Спецификация RFC 7231
Если вы встретили эту ошибку, скорее всего, веб-сервер не успевает обрабатывать все поступающие на него запросы из-за нехватки ресурсов или технического обслуживания. Однако бывает, что ошибка 500 возникает не со стороны сервера, а со стороны клиента. Поэтому сначала стоит определить, на чьей стороне проблема. Если вы не являетесь администратором сайта, на котором встретили ошибку, проверьте, нет ли проблем с вашей стороны.
Как исправить ошибку 503 со стороны пользователя
-
1.
Перезагрузите страницу при помощи клавиши F5. Бывает, что проблема действительно временная и возникла в прошлый раз, когда вы пытались открыть страницу.
-
2.
Если после нескольких перезагрузок страницы ошибка всё равно возникает, попробуйте открыть сайт через другой браузер. Если в другом браузере ошибка не воспроизводится, очистите кэш на своем браузере. Например, в Google Chrome нажмите комбинацию клавиш Ctrl+Shift+Delete:
Очистить историю в Google Chrome
-
3.
Если действия выше не помогли, попробуйте перейти на сайт с другого устройства. Будет лучше, если оно будет подключено к другой сети, чтобы исключить проблему со стороны интернет-провайдера. Откройте сайт на телефоне через мобильный интернет или попросите сделать это кого-нибудь ещё. Если на другом устройстве сайт работает, попробуйте перезагрузить ваше устройство. При возможности то же самое лучше сделать и с роутером.
-
4.
Если ничего из перечисленного вам не помогло, попробуйте связаться с владельцем сайта. Сделать это можно через форму обратной связи или по email, указанному на сайте. Если недоступен сайт целиком, а не какая-то определенная страница, попробуйте найти контакты в поисковых системах, в социальных сетях или на форумах.
Эти действия помогут понять, с чьей стороны проблема. Если вам самостоятельно не удалось решить проблему, то остаётся только ждать решения проблемы владельцем сайта. Скорее всего, это массовая проблема, и её решением уже занимаются. Попробуйте открыть сайт позже.
Ошибка недоступности, если вы владелец сайта
Частые ошибки 503 на вашем сайте могут негативно сказаться на позициях в поисковых системах и привести к снижению трафика. Посетители могут просто не вернуться на ваш сайт. Не игнорируйте проблему и сразу приступайте к её решению. Вот несколько вариантов решения:
- На любом хостинге есть ограничения и лимиты, которые не стоит превышать. Их устанавливает хостинг-провайдер. Превышение лимитов может привести к возникновению проблем на сайте, в том числе и к ошибке 503. Изучить характеристики вашего тарифного плана вы можете на сайте хостинг-провайдера. Для хостинга REG.RU действуют следующие технические ограничения.
- Хостинг может не справляться с большим количеством посетителей на сайте. В этом случае может помочь смена тарифного плана или переезд к новому хостинг-провайдеру.
- Бывает, что неактуальные версии плагинов и других компонентов движка нарушают работу сайта. Попробуйте по очереди отключать установленные плагины вашей CMS и проверять работоспособность сайта после каждого. Если ошибка не возникает после отключения очередного плагина, обновите этот плагин до последней версии. Возможно, что в новой версии разработчик уже внёс исправления. Если обновление не помогло, плагину нужно искать альтернативу.
- Регулярно обновляйте CMS и её компоненты. Зачастую обновления направлены на оптимизацию работы движка, устранение уязвимостей, борьбу с багами, повышение безопасности и быстродействия. Удалите все ненужные компоненты, которыми не пользуетесь. Оставьте только самые необходимые, чтобы уменьшить нагрузку на сервер.
- Проанализируйте скрипты сайта. К HTTP Error 503 может привести неправильная работа скриптов на сайте. Выполните их диагностику и убедитесь, что на сайте не включен режим технических работ.
- Не загружайте крупные файлы при помощи PHP. Очень часто хостинг-провайдер ограничивает время выполнения скрипта, и вы можете не уложиться в этот лимит. Ещё одним минусом передачи файлов через PHP является создание отдельного PHP-процесса, который будет занят загрузкой файла, а не обработкой запросов посетителей. Загружайте файлы по FTP, чтобы уменьшить нагрузку на хостинг.
- Запускайте массовые почтовые рассылки в периоды минимальной активности на вашем сайте. Точно так же стоит поступить и с техническими работами на сайте и сервере.
- Поисковые роботы могут генерировать большое количество обращений к сайту. Проанализируйте статистику по User-Agent и выясните, какие роботы создают нагрузку. При помощи файла robots.txt задайте временной интервал обращений.
- Настройте кэширование средствами CMS или хостинга. В WordPress вы можете настроить кэширование с помощью нашей инструкции: Что такое кэширование и как управлять им в WordPress. В панели управления хостингом тоже часто имеются встроенные инструменты по настройке кэширования.
- Запросы к сторонним ресурсам могут замедлять генерацию и отдачу контента, что в итоге может привести к 503 ошибке. Если удалённый сервер недоступен, ваш сайт потратит больше времени на ожидание ответа. Уменьшите тайм-аут ожидания ответа от стороннего ресурса или вовсе откажитесь от таких запросов. Работоспособность сторонних сервисов невозможно контролировать.
Не всегда проблему можно решить самостоятельно. Иногда лучше сразу обратиться за помощью к опытным специалистам. Если считаете, что вашего опыта и умений недостаточно для решения проблемы, свяжитесь со службой поддержки вашего хостинг-провайдера.
Ошибка 503 на хостинге REG.RU
-
1.
Ошибка может возникнуть из-за превышения лимита на количество PHP-процессов. Согласно техническим ограничениям, на тарифных планах Host максимальное количество процессов PHP составляет 4, на тарифных планах VIP — 32.
Чтобы посмотреть запущенные PHP-процессы, подключитесь по SSH и выполните следующую команду:
ps aux | grep php | grep u1234567
Где u1234567 — ваш логин хостинга (Как узнать логин хостинга).
Чтобы завершить текущие php-процессы, измените версию PHP на отличную от текущей. Затем включите версию PHP, которая была установлена ранее.
-
2.
Максимальное количество процессов на тарифных планах Host составляет 18, а на VIP — 48. Если общее количество процессов (PHP, IMAP, Cron и др.) будет превышено, то может возникнуть ошибка «503 временно недоступен».
Технические ограничения хостинга REG.RU
Чаще всего причиной является большое количество процессов IMAP из-за многочисленных подключений к ящикам. В качестве решения проблемы попробуйте подключаться к почтовому серверу по протоколу POP3. Это позволит уменьшить общее количество процессов.
-
3.
Максимальное количество HTTP-запросов в секунду на один домен: 75 на тарифах Host и 300 на VIP. При превышении этого лимита 503 ошибку может возвращать весь сайт или часть контента на нём. Причиной может быть большое количество запросов в секунду или контента на сайте (картинки, баннеры).
-
4.
На VPS ошибка может возникнуть из-за DDoS-атаки, из-за которой увеличивается нагрузка на сервер.
Если вам не удалось решить проблему на хостинге REG.RU самостоятельно, напишите заявку в службу поддержки.