MongoDB Atlas Error while performing transaction on multiple collections (code 8000)












2














I'm trying to perform a transaction on a Mongo DB Atlas M0 instance from Mongo DB Node JS driver (as described here) and I'm getting the following error:



code:8000
codeName:"AtlasError"
errmsg:"internal atlas error checking things: Failure getting dbStats: read tcp 192.168.254.78:50064->192.168.254.78:27000: i/o timeout"
message:"internal atlas error checking things: Failure getting dbStats: read tcp 192.168.254.78:50064->192.168.254.78:27000: i/o timeout"
name:"MongoError"


I've been searching for a while now and can't find any clue on how to solve this.



Aditional information:




  • The error is thrown after adding the second operation to the
    transaction.


  • If I remove all the other operations and leave only one (doesn't

    matter which) it works fine.


  • If I change the order of the operations (to any order) the error is

    still on adding the second operation.


  • If the operations are all performed to the same db and collection, it works fine



My code:



async function connect () {

if (dbClient !== null && dbClient.isConnected()) {
console.log('Reusing db connection => ' + JSON.stringify(dbClient));
} else {
console.log('Connecting to database');
dbClient = await MongoClient.connect(url, { useNewUrlParser: true });
console.log('Successfully connected to database');
}
}

async function insertDocuments(document1, document2, document3) {

try {
await connect();
} catch (error) {
throw error
}

let session = dbClient.startSession();

session.startTransaction({
readConcern: { level: 'snapshot' },
writeConcern: { w: 'majority' }
});

const collection1 = dbClient.db('mydbname').collection('collection1');
const collection2 = dbClient.db('mydbname').collection('collection2');
const collection3 = dbClient.db('mydbname').collection('collection3');
const logsCollection = dbClient.db('mydbname').collection('logs');

await collection1.replaceOne(
{ _id: document1._id },
document1,
{
upsert: true,
session
}
);
await collection2.replaceOne(
{ _id: document2._id },
document2,
{
upsert: true,
session
}
);
await collection3.replaceOne(
{ _id: document3._id },
document3,
{
upsert: true,
session
}
);
await logsCollection.updateOne(
{ _id: document1._id },
{ $unset: { estoque: '' } },
{ session }
);

try {
await commitWithRetry(session);
} catch (error) {
await session.abortTransaction();
throw error;
}
}

async function commitWithRetry(session) {
try {
await session.commitTransaction();
console.log('Transação gravada com sucesso');
} catch (error) {
if (
error.errorLabels &&
error.errorLabels.indexOf('UnknownTransactionCommitResult') >= 0
) {
console.log('Transação não realizada, tentando novamente ...');
await commitWithRetry(session);
} else {
console.log('Erro ao gravar no banco de dados ...');
throw error;
}
}
}


Any idea on how to fix this? Thanks in advance!










share|improve this question
























  • " ... Atlas M0 instance ..." - So do you mean there is only one node? I suppose "technically" even with one node it should still be registered as a replica set. Probably depends on how you are actually connecting to this though, and your connection string is missing from the sample code. If you just copy the string that should be provided then it "should" be fine. But I suspect you omitted the replicaSet parts.
    – Neil Lunn
    Nov 12 at 1:38












  • @NeilLunn sorry for the delay. This is my connection string: 'mongodb+srv://<USERNAME>:<PASSWORD@dev-qa-nftzq.mongodb.net/test?retryWrites=true'. What do you mean by "But I suspect you omitted the replicaSet parts."? How to include it?
    – GCSDC
    Nov 12 at 17:04










  • I'm experiencing a similar problem, it appears to be related to accessing multiple collections. I'd already tested the code on a local replSet with no errors, so it might be an Atlas problem rather than a MongoDB problem. On the other hand, that local replSet only had 1 node. Have you gotten around to testing it with an M10 or better cluster?
    – Dr Bearhands
    Nov 15 at 15:15






  • 1




    @GCSDC Well, I made a support ticket. Will let you know how that turns out.
    – Dr Bearhands
    Nov 16 at 18:03






  • 1




    @GCSDC Not yet.
    – Dr Bearhands
    Nov 30 at 12:23
















2














I'm trying to perform a transaction on a Mongo DB Atlas M0 instance from Mongo DB Node JS driver (as described here) and I'm getting the following error:



code:8000
codeName:"AtlasError"
errmsg:"internal atlas error checking things: Failure getting dbStats: read tcp 192.168.254.78:50064->192.168.254.78:27000: i/o timeout"
message:"internal atlas error checking things: Failure getting dbStats: read tcp 192.168.254.78:50064->192.168.254.78:27000: i/o timeout"
name:"MongoError"


I've been searching for a while now and can't find any clue on how to solve this.



Aditional information:




  • The error is thrown after adding the second operation to the
    transaction.


  • If I remove all the other operations and leave only one (doesn't

    matter which) it works fine.


  • If I change the order of the operations (to any order) the error is

    still on adding the second operation.


  • If the operations are all performed to the same db and collection, it works fine



My code:



async function connect () {

if (dbClient !== null && dbClient.isConnected()) {
console.log('Reusing db connection => ' + JSON.stringify(dbClient));
} else {
console.log('Connecting to database');
dbClient = await MongoClient.connect(url, { useNewUrlParser: true });
console.log('Successfully connected to database');
}
}

async function insertDocuments(document1, document2, document3) {

try {
await connect();
} catch (error) {
throw error
}

let session = dbClient.startSession();

session.startTransaction({
readConcern: { level: 'snapshot' },
writeConcern: { w: 'majority' }
});

const collection1 = dbClient.db('mydbname').collection('collection1');
const collection2 = dbClient.db('mydbname').collection('collection2');
const collection3 = dbClient.db('mydbname').collection('collection3');
const logsCollection = dbClient.db('mydbname').collection('logs');

await collection1.replaceOne(
{ _id: document1._id },
document1,
{
upsert: true,
session
}
);
await collection2.replaceOne(
{ _id: document2._id },
document2,
{
upsert: true,
session
}
);
await collection3.replaceOne(
{ _id: document3._id },
document3,
{
upsert: true,
session
}
);
await logsCollection.updateOne(
{ _id: document1._id },
{ $unset: { estoque: '' } },
{ session }
);

try {
await commitWithRetry(session);
} catch (error) {
await session.abortTransaction();
throw error;
}
}

async function commitWithRetry(session) {
try {
await session.commitTransaction();
console.log('Transação gravada com sucesso');
} catch (error) {
if (
error.errorLabels &&
error.errorLabels.indexOf('UnknownTransactionCommitResult') >= 0
) {
console.log('Transação não realizada, tentando novamente ...');
await commitWithRetry(session);
} else {
console.log('Erro ao gravar no banco de dados ...');
throw error;
}
}
}


Any idea on how to fix this? Thanks in advance!










share|improve this question
























  • " ... Atlas M0 instance ..." - So do you mean there is only one node? I suppose "technically" even with one node it should still be registered as a replica set. Probably depends on how you are actually connecting to this though, and your connection string is missing from the sample code. If you just copy the string that should be provided then it "should" be fine. But I suspect you omitted the replicaSet parts.
    – Neil Lunn
    Nov 12 at 1:38












  • @NeilLunn sorry for the delay. This is my connection string: 'mongodb+srv://<USERNAME>:<PASSWORD@dev-qa-nftzq.mongodb.net/test?retryWrites=true'. What do you mean by "But I suspect you omitted the replicaSet parts."? How to include it?
    – GCSDC
    Nov 12 at 17:04










  • I'm experiencing a similar problem, it appears to be related to accessing multiple collections. I'd already tested the code on a local replSet with no errors, so it might be an Atlas problem rather than a MongoDB problem. On the other hand, that local replSet only had 1 node. Have you gotten around to testing it with an M10 or better cluster?
    – Dr Bearhands
    Nov 15 at 15:15






  • 1




    @GCSDC Well, I made a support ticket. Will let you know how that turns out.
    – Dr Bearhands
    Nov 16 at 18:03






  • 1




    @GCSDC Not yet.
    – Dr Bearhands
    Nov 30 at 12:23














2












2








2


2





I'm trying to perform a transaction on a Mongo DB Atlas M0 instance from Mongo DB Node JS driver (as described here) and I'm getting the following error:



code:8000
codeName:"AtlasError"
errmsg:"internal atlas error checking things: Failure getting dbStats: read tcp 192.168.254.78:50064->192.168.254.78:27000: i/o timeout"
message:"internal atlas error checking things: Failure getting dbStats: read tcp 192.168.254.78:50064->192.168.254.78:27000: i/o timeout"
name:"MongoError"


I've been searching for a while now and can't find any clue on how to solve this.



Aditional information:




  • The error is thrown after adding the second operation to the
    transaction.


  • If I remove all the other operations and leave only one (doesn't

    matter which) it works fine.


  • If I change the order of the operations (to any order) the error is

    still on adding the second operation.


  • If the operations are all performed to the same db and collection, it works fine



My code:



async function connect () {

if (dbClient !== null && dbClient.isConnected()) {
console.log('Reusing db connection => ' + JSON.stringify(dbClient));
} else {
console.log('Connecting to database');
dbClient = await MongoClient.connect(url, { useNewUrlParser: true });
console.log('Successfully connected to database');
}
}

async function insertDocuments(document1, document2, document3) {

try {
await connect();
} catch (error) {
throw error
}

let session = dbClient.startSession();

session.startTransaction({
readConcern: { level: 'snapshot' },
writeConcern: { w: 'majority' }
});

const collection1 = dbClient.db('mydbname').collection('collection1');
const collection2 = dbClient.db('mydbname').collection('collection2');
const collection3 = dbClient.db('mydbname').collection('collection3');
const logsCollection = dbClient.db('mydbname').collection('logs');

await collection1.replaceOne(
{ _id: document1._id },
document1,
{
upsert: true,
session
}
);
await collection2.replaceOne(
{ _id: document2._id },
document2,
{
upsert: true,
session
}
);
await collection3.replaceOne(
{ _id: document3._id },
document3,
{
upsert: true,
session
}
);
await logsCollection.updateOne(
{ _id: document1._id },
{ $unset: { estoque: '' } },
{ session }
);

try {
await commitWithRetry(session);
} catch (error) {
await session.abortTransaction();
throw error;
}
}

async function commitWithRetry(session) {
try {
await session.commitTransaction();
console.log('Transação gravada com sucesso');
} catch (error) {
if (
error.errorLabels &&
error.errorLabels.indexOf('UnknownTransactionCommitResult') >= 0
) {
console.log('Transação não realizada, tentando novamente ...');
await commitWithRetry(session);
} else {
console.log('Erro ao gravar no banco de dados ...');
throw error;
}
}
}


Any idea on how to fix this? Thanks in advance!










share|improve this question















I'm trying to perform a transaction on a Mongo DB Atlas M0 instance from Mongo DB Node JS driver (as described here) and I'm getting the following error:



code:8000
codeName:"AtlasError"
errmsg:"internal atlas error checking things: Failure getting dbStats: read tcp 192.168.254.78:50064->192.168.254.78:27000: i/o timeout"
message:"internal atlas error checking things: Failure getting dbStats: read tcp 192.168.254.78:50064->192.168.254.78:27000: i/o timeout"
name:"MongoError"


I've been searching for a while now and can't find any clue on how to solve this.



Aditional information:




  • The error is thrown after adding the second operation to the
    transaction.


  • If I remove all the other operations and leave only one (doesn't

    matter which) it works fine.


  • If I change the order of the operations (to any order) the error is

    still on adding the second operation.


  • If the operations are all performed to the same db and collection, it works fine



My code:



async function connect () {

if (dbClient !== null && dbClient.isConnected()) {
console.log('Reusing db connection => ' + JSON.stringify(dbClient));
} else {
console.log('Connecting to database');
dbClient = await MongoClient.connect(url, { useNewUrlParser: true });
console.log('Successfully connected to database');
}
}

async function insertDocuments(document1, document2, document3) {

try {
await connect();
} catch (error) {
throw error
}

let session = dbClient.startSession();

session.startTransaction({
readConcern: { level: 'snapshot' },
writeConcern: { w: 'majority' }
});

const collection1 = dbClient.db('mydbname').collection('collection1');
const collection2 = dbClient.db('mydbname').collection('collection2');
const collection3 = dbClient.db('mydbname').collection('collection3');
const logsCollection = dbClient.db('mydbname').collection('logs');

await collection1.replaceOne(
{ _id: document1._id },
document1,
{
upsert: true,
session
}
);
await collection2.replaceOne(
{ _id: document2._id },
document2,
{
upsert: true,
session
}
);
await collection3.replaceOne(
{ _id: document3._id },
document3,
{
upsert: true,
session
}
);
await logsCollection.updateOne(
{ _id: document1._id },
{ $unset: { estoque: '' } },
{ session }
);

try {
await commitWithRetry(session);
} catch (error) {
await session.abortTransaction();
throw error;
}
}

async function commitWithRetry(session) {
try {
await session.commitTransaction();
console.log('Transação gravada com sucesso');
} catch (error) {
if (
error.errorLabels &&
error.errorLabels.indexOf('UnknownTransactionCommitResult') >= 0
) {
console.log('Transação não realizada, tentando novamente ...');
await commitWithRetry(session);
} else {
console.log('Erro ao gravar no banco de dados ...');
throw error;
}
}
}


Any idea on how to fix this? Thanks in advance!







mongodb mongodb-atlas






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 15 at 17:14

























asked Nov 11 at 23:09









GCSDC

381313




381313












  • " ... Atlas M0 instance ..." - So do you mean there is only one node? I suppose "technically" even with one node it should still be registered as a replica set. Probably depends on how you are actually connecting to this though, and your connection string is missing from the sample code. If you just copy the string that should be provided then it "should" be fine. But I suspect you omitted the replicaSet parts.
    – Neil Lunn
    Nov 12 at 1:38












  • @NeilLunn sorry for the delay. This is my connection string: 'mongodb+srv://<USERNAME>:<PASSWORD@dev-qa-nftzq.mongodb.net/test?retryWrites=true'. What do you mean by "But I suspect you omitted the replicaSet parts."? How to include it?
    – GCSDC
    Nov 12 at 17:04










  • I'm experiencing a similar problem, it appears to be related to accessing multiple collections. I'd already tested the code on a local replSet with no errors, so it might be an Atlas problem rather than a MongoDB problem. On the other hand, that local replSet only had 1 node. Have you gotten around to testing it with an M10 or better cluster?
    – Dr Bearhands
    Nov 15 at 15:15






  • 1




    @GCSDC Well, I made a support ticket. Will let you know how that turns out.
    – Dr Bearhands
    Nov 16 at 18:03






  • 1




    @GCSDC Not yet.
    – Dr Bearhands
    Nov 30 at 12:23


















  • " ... Atlas M0 instance ..." - So do you mean there is only one node? I suppose "technically" even with one node it should still be registered as a replica set. Probably depends on how you are actually connecting to this though, and your connection string is missing from the sample code. If you just copy the string that should be provided then it "should" be fine. But I suspect you omitted the replicaSet parts.
    – Neil Lunn
    Nov 12 at 1:38












  • @NeilLunn sorry for the delay. This is my connection string: 'mongodb+srv://<USERNAME>:<PASSWORD@dev-qa-nftzq.mongodb.net/test?retryWrites=true'. What do you mean by "But I suspect you omitted the replicaSet parts."? How to include it?
    – GCSDC
    Nov 12 at 17:04










  • I'm experiencing a similar problem, it appears to be related to accessing multiple collections. I'd already tested the code on a local replSet with no errors, so it might be an Atlas problem rather than a MongoDB problem. On the other hand, that local replSet only had 1 node. Have you gotten around to testing it with an M10 or better cluster?
    – Dr Bearhands
    Nov 15 at 15:15






  • 1




    @GCSDC Well, I made a support ticket. Will let you know how that turns out.
    – Dr Bearhands
    Nov 16 at 18:03






  • 1




    @GCSDC Not yet.
    – Dr Bearhands
    Nov 30 at 12:23
















" ... Atlas M0 instance ..." - So do you mean there is only one node? I suppose "technically" even with one node it should still be registered as a replica set. Probably depends on how you are actually connecting to this though, and your connection string is missing from the sample code. If you just copy the string that should be provided then it "should" be fine. But I suspect you omitted the replicaSet parts.
– Neil Lunn
Nov 12 at 1:38






" ... Atlas M0 instance ..." - So do you mean there is only one node? I suppose "technically" even with one node it should still be registered as a replica set. Probably depends on how you are actually connecting to this though, and your connection string is missing from the sample code. If you just copy the string that should be provided then it "should" be fine. But I suspect you omitted the replicaSet parts.
– Neil Lunn
Nov 12 at 1:38














@NeilLunn sorry for the delay. This is my connection string: 'mongodb+srv://<USERNAME>:<PASSWORD@dev-qa-nftzq.mongodb.net/test?retryWrites=true'. What do you mean by "But I suspect you omitted the replicaSet parts."? How to include it?
– GCSDC
Nov 12 at 17:04




@NeilLunn sorry for the delay. This is my connection string: 'mongodb+srv://<USERNAME>:<PASSWORD@dev-qa-nftzq.mongodb.net/test?retryWrites=true'. What do you mean by "But I suspect you omitted the replicaSet parts."? How to include it?
– GCSDC
Nov 12 at 17:04












I'm experiencing a similar problem, it appears to be related to accessing multiple collections. I'd already tested the code on a local replSet with no errors, so it might be an Atlas problem rather than a MongoDB problem. On the other hand, that local replSet only had 1 node. Have you gotten around to testing it with an M10 or better cluster?
– Dr Bearhands
Nov 15 at 15:15




I'm experiencing a similar problem, it appears to be related to accessing multiple collections. I'd already tested the code on a local replSet with no errors, so it might be an Atlas problem rather than a MongoDB problem. On the other hand, that local replSet only had 1 node. Have you gotten around to testing it with an M10 or better cluster?
– Dr Bearhands
Nov 15 at 15:15




1




1




@GCSDC Well, I made a support ticket. Will let you know how that turns out.
– Dr Bearhands
Nov 16 at 18:03




@GCSDC Well, I made a support ticket. Will let you know how that turns out.
– Dr Bearhands
Nov 16 at 18:03




1




1




@GCSDC Not yet.
– Dr Bearhands
Nov 30 at 12:23




@GCSDC Not yet.
– Dr Bearhands
Nov 30 at 12:23












2 Answers
2






active

oldest

votes


















2














I had this same issue and could not solve it. I ended up creating a new cluster on Azure (instead of AWS) and it seems to be working fine.



Not sure if this is an issue with their implementation on AWS or case by case mis-configuration



Update: The same error is now happening on the new cluster. I raised a ticket and got the following response;




This has been determined to be a bug currently affecting the M0 free cluster and shared tiers of Atlas (M2 and M5). We have opened an internal bug report to address this. While the internal development queue for our Cloud products is not publicly visible, we are tracking the work required to make multi-document transactions work on Atlas free tier clusters.




They said the same thing as the other answer. Please use M10. However, M10 is about $60/m which is not quite a resolution by any means. It also completely invalidates the main selling point of them saying M0 now includes MongoDb 4.0






share|improve this answer























  • Thanks Michael! Do you have a ticket number or any reference to keep track of the issue?
    – GCSDC
    Nov 21 at 14:55










  • They've mentioned their internal development queue is hidden, so I don't think there will be much for you to see. Personal support tickets are not visible to the public so I can't share it, but there's not a lot of info on that either.
    – Dr Bearhands
    Nov 21 at 15:01



















1














I was having the same issue. Support was not specially helpful as they said that since I was using Mongoose they couldn't help me out. However, they were kind enough to gift me 10$ in credit so I could test it out with a higher tier.



That was the issue, as soon as I upgraded to M10 tier (the next one after M0) transactions started working as intended. Your code is very similar as mine, only that I was creating one document and updating 2 others at the same time. Just like in your case, the first one went through (no matter the order) and the next just timed out with the same error.



Hope it helps :)






share|improve this answer





















    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53254164%2fmongodb-atlas-error-while-performing-transaction-on-multiple-collections-code-8%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    2














    I had this same issue and could not solve it. I ended up creating a new cluster on Azure (instead of AWS) and it seems to be working fine.



    Not sure if this is an issue with their implementation on AWS or case by case mis-configuration



    Update: The same error is now happening on the new cluster. I raised a ticket and got the following response;




    This has been determined to be a bug currently affecting the M0 free cluster and shared tiers of Atlas (M2 and M5). We have opened an internal bug report to address this. While the internal development queue for our Cloud products is not publicly visible, we are tracking the work required to make multi-document transactions work on Atlas free tier clusters.




    They said the same thing as the other answer. Please use M10. However, M10 is about $60/m which is not quite a resolution by any means. It also completely invalidates the main selling point of them saying M0 now includes MongoDb 4.0






    share|improve this answer























    • Thanks Michael! Do you have a ticket number or any reference to keep track of the issue?
      – GCSDC
      Nov 21 at 14:55










    • They've mentioned their internal development queue is hidden, so I don't think there will be much for you to see. Personal support tickets are not visible to the public so I can't share it, but there's not a lot of info on that either.
      – Dr Bearhands
      Nov 21 at 15:01
















    2














    I had this same issue and could not solve it. I ended up creating a new cluster on Azure (instead of AWS) and it seems to be working fine.



    Not sure if this is an issue with their implementation on AWS or case by case mis-configuration



    Update: The same error is now happening on the new cluster. I raised a ticket and got the following response;




    This has been determined to be a bug currently affecting the M0 free cluster and shared tiers of Atlas (M2 and M5). We have opened an internal bug report to address this. While the internal development queue for our Cloud products is not publicly visible, we are tracking the work required to make multi-document transactions work on Atlas free tier clusters.




    They said the same thing as the other answer. Please use M10. However, M10 is about $60/m which is not quite a resolution by any means. It also completely invalidates the main selling point of them saying M0 now includes MongoDb 4.0






    share|improve this answer























    • Thanks Michael! Do you have a ticket number or any reference to keep track of the issue?
      – GCSDC
      Nov 21 at 14:55










    • They've mentioned their internal development queue is hidden, so I don't think there will be much for you to see. Personal support tickets are not visible to the public so I can't share it, but there's not a lot of info on that either.
      – Dr Bearhands
      Nov 21 at 15:01














    2












    2








    2






    I had this same issue and could not solve it. I ended up creating a new cluster on Azure (instead of AWS) and it seems to be working fine.



    Not sure if this is an issue with their implementation on AWS or case by case mis-configuration



    Update: The same error is now happening on the new cluster. I raised a ticket and got the following response;




    This has been determined to be a bug currently affecting the M0 free cluster and shared tiers of Atlas (M2 and M5). We have opened an internal bug report to address this. While the internal development queue for our Cloud products is not publicly visible, we are tracking the work required to make multi-document transactions work on Atlas free tier clusters.




    They said the same thing as the other answer. Please use M10. However, M10 is about $60/m which is not quite a resolution by any means. It also completely invalidates the main selling point of them saying M0 now includes MongoDb 4.0






    share|improve this answer














    I had this same issue and could not solve it. I ended up creating a new cluster on Azure (instead of AWS) and it seems to be working fine.



    Not sure if this is an issue with their implementation on AWS or case by case mis-configuration



    Update: The same error is now happening on the new cluster. I raised a ticket and got the following response;




    This has been determined to be a bug currently affecting the M0 free cluster and shared tiers of Atlas (M2 and M5). We have opened an internal bug report to address this. While the internal development queue for our Cloud products is not publicly visible, we are tracking the work required to make multi-document transactions work on Atlas free tier clusters.




    They said the same thing as the other answer. Please use M10. However, M10 is about $60/m which is not quite a resolution by any means. It also completely invalidates the main selling point of them saying M0 now includes MongoDb 4.0







    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited Nov 21 at 12:51

























    answered Nov 20 at 20:28









    Michael McCabe

    49118




    49118












    • Thanks Michael! Do you have a ticket number or any reference to keep track of the issue?
      – GCSDC
      Nov 21 at 14:55










    • They've mentioned their internal development queue is hidden, so I don't think there will be much for you to see. Personal support tickets are not visible to the public so I can't share it, but there's not a lot of info on that either.
      – Dr Bearhands
      Nov 21 at 15:01


















    • Thanks Michael! Do you have a ticket number or any reference to keep track of the issue?
      – GCSDC
      Nov 21 at 14:55










    • They've mentioned their internal development queue is hidden, so I don't think there will be much for you to see. Personal support tickets are not visible to the public so I can't share it, but there's not a lot of info on that either.
      – Dr Bearhands
      Nov 21 at 15:01
















    Thanks Michael! Do you have a ticket number or any reference to keep track of the issue?
    – GCSDC
    Nov 21 at 14:55




    Thanks Michael! Do you have a ticket number or any reference to keep track of the issue?
    – GCSDC
    Nov 21 at 14:55












    They've mentioned their internal development queue is hidden, so I don't think there will be much for you to see. Personal support tickets are not visible to the public so I can't share it, but there's not a lot of info on that either.
    – Dr Bearhands
    Nov 21 at 15:01




    They've mentioned their internal development queue is hidden, so I don't think there will be much for you to see. Personal support tickets are not visible to the public so I can't share it, but there's not a lot of info on that either.
    – Dr Bearhands
    Nov 21 at 15:01













    1














    I was having the same issue. Support was not specially helpful as they said that since I was using Mongoose they couldn't help me out. However, they were kind enough to gift me 10$ in credit so I could test it out with a higher tier.



    That was the issue, as soon as I upgraded to M10 tier (the next one after M0) transactions started working as intended. Your code is very similar as mine, only that I was creating one document and updating 2 others at the same time. Just like in your case, the first one went through (no matter the order) and the next just timed out with the same error.



    Hope it helps :)






    share|improve this answer


























      1














      I was having the same issue. Support was not specially helpful as they said that since I was using Mongoose they couldn't help me out. However, they were kind enough to gift me 10$ in credit so I could test it out with a higher tier.



      That was the issue, as soon as I upgraded to M10 tier (the next one after M0) transactions started working as intended. Your code is very similar as mine, only that I was creating one document and updating 2 others at the same time. Just like in your case, the first one went through (no matter the order) and the next just timed out with the same error.



      Hope it helps :)






      share|improve this answer
























        1












        1








        1






        I was having the same issue. Support was not specially helpful as they said that since I was using Mongoose they couldn't help me out. However, they were kind enough to gift me 10$ in credit so I could test it out with a higher tier.



        That was the issue, as soon as I upgraded to M10 tier (the next one after M0) transactions started working as intended. Your code is very similar as mine, only that I was creating one document and updating 2 others at the same time. Just like in your case, the first one went through (no matter the order) and the next just timed out with the same error.



        Hope it helps :)






        share|improve this answer












        I was having the same issue. Support was not specially helpful as they said that since I was using Mongoose they couldn't help me out. However, they were kind enough to gift me 10$ in credit so I could test it out with a higher tier.



        That was the issue, as soon as I upgraded to M10 tier (the next one after M0) transactions started working as intended. Your code is very similar as mine, only that I was creating one document and updating 2 others at the same time. Just like in your case, the first one went through (no matter the order) and the next just timed out with the same error.



        Hope it helps :)







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 20 at 9:55









        Henry Ollarves

        379111




        379111






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.





            Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


            Please pay close attention to the following guidance:


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53254164%2fmongodb-atlas-error-while-performing-transaction-on-multiple-collections-code-8%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Costa Masnaga

            Fotorealismo

            Sidney Franklin