vriteio / vrite

Open-source developer content platform
https://vrite.io
Other
1.63k stars 65 forks source link

fix concurrent startup: BucketAlreadyOwnedByYou #37

Closed Eun closed 1 year ago

Eun commented 1 year ago

When starting for the first time I got this error:

/app/index.js:83166
      const exception = new models_0_1.BucketAlreadyOwnedByYou({
                        ^

BucketAlreadyOwnedByYou: Your previous request to create the named bucket succeeded and you already own it.
    at de_BucketAlreadyOwnedByYouRes (/app/index.js:83166:25)
    at de_CreateBucketCommandError (/app/index.js:80322:23)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async /app/index.js:63252:24
    at async /app/index.js:60873:22
    at async /app/index.js:64504:42
    at async /app/index.js:58145:26
    at async /app/index.js:323956:5 {
  '$fault': 'client',
  '$metadata': {
    httpStatusCode: 409,
    requestId: '1784768FD8139BAD',
    extendedRequestId: 'dd9025bab4ad464b049177c95eb6ebf374d3b3fd1af9251148b658df7ac2e3e8',
    cfId: undefined,
    attempts: 1,
    totalRetryDelay: 0
  },
  Code: 'BucketAlreadyOwnedByYou',
  BucketName: 'vrite-images',
  Resource: '/vrite-images/',
  RequestId: '1784768FD8139BAD',
  HostId: 'dd9025bab4ad464b049177c95eb6ebf374d3b3fd1af9251148b658df7ac2e3e8'
}

Node.js v18.17.1

I think the problem is related to concurrent startup.

By modifying the docker-compose file I was able to solve the problem.

This does not need to be the final fix for solving that problem, I just wanted to make it visible here.

Also I removed all the published ports for the internal services.