Opencart ошибка 503

Ошибка 503

Чтобы исправить 503 ошибку, надо понимать ее особенности и досконально изучить пути решения. Ведь все, что начинается на цифру 1, 2 или 3, является успешным действием. А http-статусы 4ХХ и 5ХХ имеют собственные характеристики и даже разновидности. Чтобы разработчик не растерялся в момент сбоя программ и возникновения разных кодов состояния http, разработан данный чек-лист действий.

Что делать, если возник 503 http-статус

Очень часто на форумах задаются вопросы по ошибке 503 Service Unavailable. Данный код состояния http говорит о том, что сервер ресурса не может обработать запрос, поступивший на него.Есть ряд причин, почему на сервере возникает эта ошибка:

  1. Перегружен из-за большого количества внешних запросов.
  2. На сервере в этот момент ведутся технические работы.
  3. В данный момент он перезагружается.

Значит, с самим сервером все в порядке. Его функции исправны. Он способен обрабатывать запросы, но в данный момент существует чрезмерная нагрузка. Поэтому придется подождать, чтобы получить ожидаемую информацию.
Иногда возле статуса 503 Service Unavailable стоит «приписка» Retry-After. То есть, сервер указывает, что сам «знает», когда будет готов к «сотрудничеству» на 100%. Обычно здесь же стоит время, которое подчеркивает, когда пользователь может вернуться, чтобы увидеть свою платформу в рабочем состоянии.

Исправить ошибку Opencart

Чтобы исправить положение с 503 Service Unavailable, следует:

  1. Обновить страницу. Если технические работы или обновление сайта к этому моменту уже завершится, то ресурс будет полностью готов к работе. Сделать это можно нажатием клавишы F5.
  2. Проведите очистку файлов. То есть, очистите кеш в браузере и удалите все куки. Совершать эти действия можно в паре с п.1.
  3. Если вы зашли на свой сайт не как разработчик, а пользователь и увидели этот http-статус, проверьте состояние удаленного ресурса. Для этого задействуйте один из сайтов проверки. Это может быть IsItDownRightNow или DownforEveryoneorJustMe. Здесь можно оценить доступность ресурса для разных пользователей.
  4. Найдите поврежденный файл, который «попал» к вам при разработке ресурса. Для этого наберите Ctrl+Shift+I. Данный «ансамбль» с успехом заменяет кнопка F12. Также можно войти через меню Веб-разработка, чтобы попасть в Инструменты разработчика. Цель — найти Сеть (Network). Выберите тип документа, нажав на пункт HTML. Тут на ошибки указывает такое же число в колонке Статус. Если вдруг высветился код ответа 200, тогда основная проблема возникновения 503 Service Unavailable — в верстке или модуле. Для того, чтобы все исправить, надо восстановить бэкап или полностью отключить последний добавленный модуль.

Когда не хочется использовать некачественный продукт и не приходилось затрачивать время, чтобы исправить 503 ошибку, пользуйтесь нашим разработанным чек-листом. А также применяйте только те модули и темы, которые предоставлены на сайте OpenCart3x. Качественный продукт, предложенный здесь, не заставит наших клиентов тратить время и силы на поиск в интернете ответов на вопросы о 503 и других http-статусов. Если у вас остались дополнительные вопросы, обращайтесь в техподдержку сайта.

Подведём итог.

Данная ошибка возникает в следующих случаях — лимит базы данных исчерпан и больше не может обрабатывать запросы. Увидев 503 ошибку на экране, стоит понимать, что сервер защищается таким образом и говорит Вам, что он недоступен.

Что нужно сделать:

  • Зайти в базу данных и очистить сессии

Также, ошибка 503 возникает в случае неправильного sql запроса. Может относится к админке или к каталогу.

Не получилось исправить ошибку? Заказывайте услугу: «

Исправить ошибку Opencart

»

Модуль Упрощенный заказ на Opencart 3.0

Модуль Авторизация через соцсети Opencart 3.0

Создание API для интеграции с сайтами

Исправить ошибку Opencart

Исправить ошибку Opencart

OpenCart — один из самых популярных движков для создания интернет-магазина. Бесплатная лицензия про..

Цена:
724 руб.

[SOLVED] — opencart 3.0.2.0 503 service unavailable please help


Hello everyone,

I am using opencart 3.0.2.0, and when i click «customers» module in background and check customer information then i click other module,
it tells me a 503 service unavailable error, i do not know what’s the problem please help.

Thanks in Advance

below is the error code:

error

Code: Select all

<!DOCTYPE HTML PUBLIC"-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>503 Service Unavailable</title>
</head><body>
<h1>Service Unavailable</h1>
<p>The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.</p>
<p>Additionally, a 503 Service Unavailable error was encountered while trying to use an ErrorDocument to handle the request.</p>
</body></html>

Last edited by straightlight on Fri May 22, 2020 7:35 pm, edited 2 times in total.

Reason: Added code tags.

Re: opencart 3.0.2.0 503 service unavailable please help


Post

by sw!tch » Fri May 22, 2020 11:06 am

Check your main server logs for an error. Typically in the root of your webspace or in your control panel admin.


Full Stack Web Developer :: Send a PM for Custom Work.
Backup and learn how to recover before you make any changes!

Re: opencart 3.0.2.0 503 service unavailable please help


Post

by dafashi0016 » Fri May 22, 2020 1:04 pm

sw!tch wrote: ↑

Fri May 22, 2020 11:06 am


Check your main server logs for an error. Typically in the root of your webspace or in your control panel admin.

Thank you for you help

Re: [SOLVED] — opencart 3.0.2.0 503 service unavailable please help


Post

by mamagod » Sat Nov 28, 2020 5:54 pm

I’m having the same error when i try to register as customer. contact us or send email from admin, someone help?

Re: [SOLVED] — opencart 3.0.2.0 503 service unavailable please help


Post

by sw!tch » Sun Nov 29, 2020 2:08 am

Probably caused by a mail error if its happening on the register, contact page, etc. Again need error logs as mentioned above.


Full Stack Web Developer :: Send a PM for Custom Work.
Backup and learn how to recover before you make any changes!

Who is online

Users browsing this forum: No registered users and 1 guest

  1. Доброго времени суток. Вчера в вебмастере появилась фатальная ошибка с кодом 503. Обратился в службу поддержке, написали следующие:

    Поведение вызвано строками 8-12 в файле ~/public_html/catalog/controller/common/maintenance.php:
    if ($this->request->server[‘SERVER_PROTOCOL’] == ‘HTTP/1.1’) {
    $this->response->addHeader(‘HTTP/1.1 503 Service Unavailable’);
    } else {
    $this->response->addHeader(‘HTTP/1.0 503 Service Unavailable’);
    }

    Соответственно этим инструкциям PHP заменяет код ответа «200 OK» на «503 Service Unavailable». Если закомментировать данный участок кода, ошибка перестанет воспроизводиться, в том числе в веб-мастере.

    Пожалуйста помогите с решением данной проблемы

  2. У вас включен режим обслуживания
    Настройки «сервер», режим обслуживания

  3. так у вас сайт в режиме обслуживания, вы видите, потому что вы залогинены в админке

  4. Снял обслуживание, заработал сайт. Думаю в вебмастере ошибка исчезнет ))

    Большое вам спасибо за помощь )

  5. Большое спасибо. Модуль установил все отлично.

    Благодарю за помощь

    С уважением Алексей


OpenCart Russia Форум

I install directadmin with CB2 + Apache + MariaDB 10.1.31 + PHP 5.6.34.
When I upload OpenCart and enable maintenance mode, Apache shows the 503 error page instead of maintenance.tpl.

I checked the catalog/controller/common/maintenance.php and found the following code:

if ($this->request->server['SERVER_PROTOCOL'] == 'HTTP/1.1') {
    $this->response->addHeader('HTTP/1.1 503 Service Unavailable');
} else {
    $this->response->addHeader('HTTP/1.0 503 Service Unavailable');
}

$this->response->addHeader('Retry-After: 3600');

I think the problem is that Apache does not handle the 503 Header correctly. When I change the web server to LiteSpeed, it is ok.

To check you can compare these two versions of the site. Both of them have the maintenance mode enabled, but:

The first is OK — http://takjens.com/

The second is not — http://server3.lammer.ir/

Please let me know how to fix this problem.


    • patched

  • rauschr


  • Closed

  • Thread is marked as Resolved.
    • #1

    (Opencart 2.0.1.1) When I setup Maintenance Mode show Error 503! / Service Unavailable!

    My OS Debian 8.6
    Imscp 1.3.7
    PHP-FPM

    Error log: empty
    Acces log :
    xxx.133.149.114 — — [11/Nov/2016:10:45:20 +0100] «GET / HTTP/1.1» 503 1130 «-» «Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.90 Safari/537.36»

    .hataccess

    1. # 1.To use URL Alias you need to be running apache with mod_rewrite enabled. # 2. In your opencart directory rename htaccess.txt to .htaccess.# For any support issues please visit: http://www.opencart.comOptions +FollowSymlinks# Prevent Directoy listing Options -Indexes# Prevent Direct Access to files<FilesMatch «(?i)((\.tpl|\.ini|\.log|(?<!robots)\.txt))»> Order deny,allow Deny from all</FilesMatch># SEO URL SettingsRewriteEngine On# If your opencart installation does not run on the main web folder make sure you folder it does run in ie. / becomes /shop/ RewriteBase /RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]RewriteRule ^(.*)$ http://%1/$1 [R=301,L]RewriteRule ^sitemap.xml$ index.php?route=feed/google_sitemap [L]RewriteRule ^googlebase.xml$ index.php?route=feed/google_base [L]RewriteRule ^download/(.*) /index.php?route=error/not_found [L]RewriteCond %{REQUEST_FILENAME} !-fRewriteCond %{REQUEST_FILENAME} !-dRewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css)RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]### Additional Settings that may need to be enabled for some servers ### Uncomment the commands by removing the # sign in front of it.### If you get an «Internal Server Error 500» after enabling any of the following settings, restore the # as this means your host doesn’t allow that.# 1. If your cart only allows you to add one item at a time, it is possible register_globals is on. This may work to disable it:# php_flag register_globals off# 2. If your cart has magic quotes enabled, This may work to disable it:# php_flag magic_quotes_gpc Off# 3. Set max upload file size. Most hosts will limit this and not allow it to be overridden but you can try# php_value upload_max_filesize 999M# 4. set max post size. uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields# php_value post_max_size 999M# 5. set max time script can take. uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields# php_value max_execution_time 200# 6. set max time for input to be recieved. Uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields# php_value max_input_time 200# 7. disable open_basedir limitations# php_admin_value open_basedir none

    Maintenance PHP code:

    1. <?php
    2. class ControllerCommonMaintenance extends Controller {
    3. public function index() {
    4. if ($this->config->get(‘config_maintenance’)) {
    5. $route = »;
    6. if (isset($this->request->get[‘route’])) {
    7. $part = explode(‘/’, $this->request->get[‘route’]);
    8. if (isset($part[0])) {
    9. $route .= $part[0];
    10. }
    11. }
    12. // Show site if logged in as admin
    13. $this->load->library(‘user’);
    14. $this->user = new User($this->registry);
    15. if (($route != ‘payment’) && !$this->user->isLogged()) {
    16. return new Action(‘common/maintenance/info’);
    17. }
    18. }
    19. }
    20. public function info() {
    21. $this->load->language(‘common/maintenance’);
    22. $this->document->setTitle($this->language->get(‘heading_title’));
    23. if ($this->request->server[‘SERVER_PROTOCOL’] == ‘HTTP/1.1’) {
    24. $this->response->addHeader(‘HTTP/1.1 503 Service Unavailable’);
    25. } else {
    26. $this->response->addHeader(‘HTTP/1.0 503 Service Unavailable’);
    27. }
    28. $this->response->addHeader(‘Retry-After: 3600’);
    29. $data[‘heading_title’] = $this->language->get(‘heading_title’);
    30. $data[‘breadcrumbs’] = array();
    31. $data[‘breadcrumbs’][] = array(
    32. ‘text’ => $this->language->get(‘text_maintenance’),
    33. ‘href’ => $this->url->link(‘common/maintenance’)
    34. );
    35. $data[‘message’] = $this->language->get(‘text_message’);
    36. $data[‘header’] = $this->load->controller(‘common/header’);
    37. $data[‘footer’] = $this->load->controller(‘common/footer’);
    38. if (file_exists(DIR_TEMPLATE . $this->config->get(‘config_template’) . ‘/template/common/maintenance.tpl’)) {
    39. $this->response->setOutput($this->load->view($this->config->get(‘config_template’) . ‘/template/common/maintenance.tpl’, $data));
    40. } else {
    41. $this->response->setOutput($this->load->view(‘default/template/common/maintenance.tpl’, $data));
    42. }
    43. }
    44. }

    Display More

    • #3

    @rauschr

    Can you try to add the following directive in your .htaccess at bottom:

    1. ErrorDocument 503 index.php

    • #4

    Better, but not perfect!

    With Debian 7.11 and imscp 1.3.5 was perfect.

    • #5

    Please, retry with

    1. ErrorDocument 503 /index.php

    I forgot slash…

    With Debian 7.11 and imscp 1.3.5 was perfect.

    The new behavior is due to the ProxyErrorOverride directive. This is not a bug. You must now cleary define error document handlers as show above.

    Note that if other errors such as 404 errors are also handled by OpenCart, you should do same for them.

    Edit: in Serie 1.4.x, we will allow the customers to disable this directive for one or many of their sites. (This behavior only affect user of mod_proxy_fcgi).

    • #7

    @rauschr

    This worked with the slash?

    • #9

    A fix has been added in the 1.3.x branch. See https://github.com/i-MSCP/imsc…ad40d724d9c364f3096bee57c
    This fix will be part of i-MSCP version 1.3.9

    Thank you for your report.

Понравилась статья? Поделить с друзьями:
  • Opencart отключить вывод ошибок
  • Opel ошибка p1660
  • Opel zafira ошибка 059761
  • Opencart внимательно проверьте форму на ошибки
  • Opencart включить отображение ошибок