[英]503 Service Temporarily Unavailable
I understand this error is fairly common, but I've come to a bit of a dead end in terms of debugging the issue. 我知道这个错误相当普遍,但是在调试问题上我走到了一个死胡同。 I'm running windows 8.1 with WAMP.
我正在使用WAMP运行Windows 8.1。 I have multiple websites running from the WAMP configuration, most of them being Drupal sites and a couple being CS-Cart sites.
我有多个使用WAMP配置运行的网站,其中大多数是Drupal站点,还有两个是CS-Cart站点。 The one I'm having an issue with is the CS-Cart site.
我遇到问题的是CS-Cart网站。
I've setup my hosts/vhosts file in exactly the same way I've set up all of my existing sites. 我已经以设置所有现有站点的完全相同的方式设置了hosts / vhosts文件。 However when I go to the browser and try and view the site, I get a 'Service unavailable' message.
但是,当我转到浏览器并尝试查看该站点时,会收到“服务不可用”消息。 In my console it turns out it's a
'503 Service Temporarily Unavailable'
. 在我的控制台中,结果是
'503 Service Temporarily Unavailable'
。 I've checked the database settings and I have an .htaccess file. 我已经检查了数据库设置,并且有一个.htaccess文件。
Here is an example of my hosts file config: 这是我的主机文件配置的示例:
<VirtualHost *:80>
ServerAdmin email@email.com
DocumentRoot "C:/wamp/www/website-location"
ServerName local.website.co.uk
ErrorLog "logs/local.website.co.uk-error.log"
CustomLog "logs/local.website.co.uk-access.log" common
</VirtualHost>
127.0.0.1 local.website.co.uk
I've checked the error logs and it's not printing anything at all. 我检查了错误日志,它根本不打印任何内容。 The only thing I can see are the HTTP requests in the access file.
我唯一能看到的是访问文件中的HTTP请求。 Any help would be much appreciated.
任何帮助将非常感激。
Ok, So I managed to sort out the issue. 好的,所以我设法解决了这个问题。 Turns out the issue was in the Database.
原来问题出在数据库中。 There is a table called
'CSCART_COMPANIES'
, the domain was pointing to the staging site as opposed to the local site. 有一个名为
'CSCART_COMPANIES'
的表,该域指向暂存站点,而不是本地站点。
Hopefully this helps others out in the future. 希望这可以在将来帮助其他人。
Please check your config.local.php file which is located on the root directory. 请检查位于根目录下的config.local.php文件。
Within you need to change $config['http_host'] 在其中您需要更改$ config ['http_host']
I had the similar problem - when clicked on category I was presented with Service Unavailable error message. 我遇到了类似的问题-在类别上单击时,出现服务不可用错误消息。 I sorted it by going into Products/ Filters and disabled all filters.
我通过进入“产品/过滤器”对它进行了排序,并禁用了所有过滤器。
We encountered the "Service Unavailable" in CS-Cart admin and catalog side this morning. 今天早上,我们在CS-Cart管理员和目录侧遇到了“服务不可用”的问题。 The first thing to check is the source of the page.
首先要检查的是页面的来源。 It should say what kind of error/exception is thrown as a comment near the bottom.
它应该在底部附近说出什么样的错误/异常。
In this case, it was 503 error. 在这种情况下,它是503错误。 The culprit?
罪魁祸首? Cache backend crashed.
缓存后端崩溃。 Redis had ran out of mem due to a big nightly backup colliding with an SEO speeder trying to gen cache for entire site.
Redis的内存不足,原因是每晚有大量备份与SEO加速器发生冲突,试图为整个站点生成缓存。
If your redis has not recovered, you can start it with # service redis start
(or restart
). 如果您的Redis尚未恢复,则可以
# service redis start
(或restart
)启动它。
To see some details of what happened, you can run # grep -i redis /usr/local/apache/logs/error_log
and look for strings like "cant connect to redis server" or # grep redis /var/log/messages
may return a line saying "OOM killed process 123 (redis-server)" where 123 is the PID of redis. 要查看发生的情况的详细信息,可以运行
# grep -i redis /usr/local/apache/logs/error_log
并查找诸如“无法连接到Redis服务器”之类的字符串,或者# grep redis /var/log/messages
可能返回这行说“ OOM杀死进程123(redis-server)”,其中123是redis的PID。
In addition to the @JDavies answer, 除了@JDavies答案之外,
Even CSCART docs page doesn't tell you the correct answer. 甚至CSCART文档页面也无法告诉您正确答案。
Here is the one if someone gets stuck in this error, 如果有人卡在此错误中,这是一个
Goto your admin panel Settings -> General and find a checkbox with label 'Close storefront:', uncheck it and you are good. 转到管理面板的设置->常规,然后找到带有标签“关闭店面:”的复选框,取消选中该复选框,您的情况就不错了。
I am using 4.3.1 version, probably this will cover all versions. 我正在使用4.3.1版本,可能涵盖了所有版本。
这很可能是由于您的网站已达到其最大并发连接数(同时访问者)限制。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.