JDavies
JDavies

Reputation: 2770

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. I have multiple websites running from the WAMP configuration, most of them being Drupal sites and a couple being CS-Cart sites. The one I'm having an issue with is the CS-Cart site.

I've setup my hosts/vhosts file in exactly the same way I've set up all of my existing sites. 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'. I've checked the database settings and I have an .htaccess file.

Here is an example of my hosts file config:

<VirtualHost *:80>
    ServerAdmin [email protected]
    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. Any help would be much appreciated.

Upvotes: 2

Views: 15316

Answers (6)

Irfan Ahmed
Irfan Ahmed

Reputation: 9384

In addition to the @JDavies answer,

Even CSCART docs page doesn't tell you the correct answer.

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.

Upvotes: 0

dhaupin
dhaupin

Reputation: 1643

We encountered the "Service Unavailable" in CS-Cart admin and catalog side this morning. 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. 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.

If your redis has not recovered, you can start it with # service redis start (or 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.

Upvotes: 0

user2777149
user2777149

Reputation: 1

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.

Upvotes: 0

Santhosh
Santhosh

Reputation: 69

This is most likely caused by your site having met its maximum concurrent connection (simultaneous visitors) limit.

Upvotes: -1

Socialwebi
Socialwebi

Reputation: 1

Please check your config.local.php file which is located on the root directory.

Within you need to change $config['http_host']

Upvotes: 0

JDavies
JDavies

Reputation: 2770

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.

Hopefully this helps others out in the future.

Upvotes: 4

Related Questions