sync_gateway 1.2 issue

Hi,
We recently upgraded to sync gateway 1.2. Since then, we are facing a lot of issues.

  1. Sometimes on starting the sync gateway, it cannot find the bucket. The log statement
    Opening db /dbname as bucket "dbname", pool "default", server <http://localhost:8091>
    is shown as
    Opening db / as bucket "dbname", pool "", server <http://localhost:8091>
    So it looks like the bucket is not found.
    We have to kill SG process and restart it, and then it works fine.

  2. Sometimes randomly SG log shows error 503 DB under maintainence

@ankit_wacker The 503 DB under maintainence message appears when an SG db is Offline.

You can check the status of a db via the Admin REST API with the following curl command:

curl -X GET http://<host>:4985/<db>/

The response will contain a state property which should have a value of “Offline” (for a 503 response)

"state":"Offline"

It is likely the db has gone offline because of the failure to find the backing bucket.

Rather than restart Sync Gateway you could try taking the bucket online via the ADMIn REST API e.g.

curl -X POST http://<host>:4985/<db>/_online

@andy Ya my bucket was offline,but i want to know why it is failing to find the backing bucket ??
This issue was not there with earlier version of SG.

Hi,I have the same issue,and When my bucket is reachable by SG, SG will not auto recover.
Should I need to taking the bucket online via ADMIN REST API manually?