question

ScottPritchard-8240 avatar image
1 Vote"
ScottPritchard-8240 asked lukepuplett answered

Cosmos: Quick start --> Create Items Contaner --> HTTP response error

As advised by the Twitter support team, just copying over my experience to here.


Just started out with Cosmos DB. Running through 'Quick start' for serverless (Core SQL, UK West)

Clicking "Create 'Items' container" on Node.js tab = "Setting offer throughput or autopilot on container is not supported for serverless accounts" in http response

Not sure if you're already aware of this, but as quick start is the first page a new customer is directed to after setting up the resource, it's not a great experience
24691-image.png



This isn't a huge issue for me, as I figured out how to configure a container outside of quickstart, but think this might put off less experienced devs.

azure-cosmos-db
image.png (179.8 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

AnuragSharma-MSFT avatar image
2 Votes"
AnuragSharma-MSFT answered

Hi @ScottPritchard-8240, Welcome to Microsoft Q&A community.

As you have rightly pointed out that the Create 'Items' container is failing when we click on the button. This is being observed when we select the Capacity Mode as 'Serverless'. However, if we select 'Provisioned throughput' it works fine.

Reason could be for 'Serverless' has removed the concept of provisioned throughput but still the code which is used has not been corrected accordingly. This is definitely a bug and I have reached out to internally to PG team and explained the issue.

I will keep you updated on any progress on the same but it could take a little time. Once again, really appreciate your inputs to make this a better experience for all users.


If an answer is helpful, please "Accept answer" or "Up-Vote" for the same which might be beneficial to other community members reading this thread.




5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

MarkBrownMSFT avatar image
1 Vote"
MarkBrownMSFT answered

Hi Scott. Thanks for your feedback. As you correctly pointed out, our Quickstarts don't work for Serverless accounts.

We'll take a look at this to find a solution for this in the portal.

Thanks.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Dannyvanderkraan-7040 avatar image
1 Vote"
Dannyvanderkraan-7040 answered

Stumbled upon this one too when I tried to do table.CreateIfNotExistsAsync() in code for the serverless offering. Our use case is going to require us to create tables dynamically. So I suppose we'll have to resort back to provisioned for now then?

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

richardbeales avatar image
0 Votes"
richardbeales answered AnuragSharma-MSFT commented

Bug still outstanding as of 21 April 2021

· 5
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @richardbeales, welcome to Microsoft Q&A forum.

Could you please provide more details about when are you facing the error along with region name? If possible, a screenshot as well.

0 Votes 0 ·

Hi @AnuragSharma-MSFT with all respect, but isn't @richardbeales referring to the bug with CosmosDB's serverless offering where you can't call table.CreateIfNotExistsAsync() because you get an exception? I'm still waiting on this fix too. We can't use serverless offering unless this is fixed unfortunately. Thank you for looking into this.

0 Votes 0 ·

Thanks @vanderKraanDanny-7063 for the inputs. Sorry for the trouble you are facing. Yes the samples are still breaking and I have escalated the same to product group again and awaiting their inputs.

For Serverless, are you specifically mentioning the Azure Cosmos DB Table API which is not working with SDKs? Reason being I tried Azure Cosmos DB SQL API and was able to create database and container using below code.

 // Create a new database
                 this.database = await this.cosmosClient.CreateDatabaseIfNotExistsAsync(databaseId);
        

 // Create a new container
             this.container = await this.database.CreateContainerIfNotExistsAsync(containerId, "/LastName");

0 Votes 0 ·
Show more comments
lukepuplett avatar image
0 Votes"
lukepuplett answered

I have an issue on GitHub for this very problem. Track it here.

https://github.com/Azure/azure-sdk-for-net/issues/22903

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.