Home > Enterprise >  can't upload candy machine collection because of time out error
can't upload candy machine collection because of time out error

Time:07-01

i am trying to upload a collection on solana devnet through metaplex candy machine cli by running

ts-node metaplex/js/packages/cli/src/candy-machine-v2-cli.ts upload \
    -e devnet \
    -k wallet/devnet.json \
    -cp config.json \
    -c example \
    ./assets

however i get the following error:

Could not complete Bundlr tx upload successfully, exiting due to:  Error: timeout of 6000d
    at createError (/Users/silachim/Desktop/newmetaplex/metaplex/js/node_modules/@)
    at RedirectableRequest.handleRequestTimeout (/Users/silachim/Desktop/newmetapl)
    at RedirectableRequest.emit (node:events:394:28)
    at RedirectableRequest.emit (node:domain:470:12)
    at Timeout.<anonymous> (/Users/silachim/Desktop/newmetaplex/metaplex/js/node_m)
    at listOnTimeout (node:internal/timers:557:17)
    at processTimers (node:internal/timers:500:7) {
  config: {
    transitional: {
      silentJSONParsing: true,
      forcedJSONParsing: true,
      clarifyTimeoutError: false
    },
    adapter: [Function: httpAdapter],
    transformRequest: [ [Function: transformRequest] ],
    transformResponse: [ [Function: transformResponse] ],
    timeout: 60000,
    xsrfCookieName: 'XSRF-TOKEN',
    xsrfHeaderName: 'X-XSRF-TOKEN',
    maxContentLength: 536870912,
    maxBodyLength: Infinity,
    validateStatus: [Function: validateStatus],
    headers: {
      Accept: 'application/json, text/plain, */*',
      'Content-Type': 'application/octet-stream',
      'User-Agent': 'axios/0.25.0',
      'Content-Length': 1858760
    },
    baseURL: 'https://devnet.bundlr.network:443',
    method: 'post',
    url: 'https://devnet.bundlr.network:443/tx/solana',
    data: <Buffer 02 00 43 1a a3 32 bd 0f 38 ab b9 9f e1 a4 e7 23 f3 f9 1e 16 46 9a ba 08>
  },
  code: 'ECONNABORTED',
  request: <ref *1> Writable {
    _writableState: WritableState {
      objectMode: false,
      highWaterMark: 16384,
      finalCalled: false,
      needDrain: false,
      ending: false,
      ended: false,
      finished: false,
      destroyed: false,
      decodeStrings: true,
      defaultEncoding: 'utf8',
      length: 0,
      writing: false,
      corked: 0,
      sync: true,
      bufferProcessing: false,
      onwrite: [Function: bound onwrite],
      writecb: null,
      writelen: 0,
      afterWriteTickInfo: null,
      buffered: [],
      bufferedIndex: 0,
      allBuffers: true,
      allNoop: true,
      pendingcb: 0,
      constructed: true,
      prefinished: false,
      errorEmitted: false,
      emitClose: true,
      autoDestroy: true,
      errored: null,
      closed: false,
      closeEmitted: false,
      [Symbol(kOnFinished)]: []
    },
    _events: [Object: null prototype] {
      response: [Function: handleResponse],
      error: [Function: handleRequestError],
      socket: [Array]
    },
    _eventsCount: 3,
    _maxListeners: undefined,
    _options: {
      maxRedirects: 21,
      maxBodyLength: Infinity,
      protocol: 'https:',
      path: '/tx/solana',
      method: 'POST',
      headers: [Object],
      agent: undefined,
      agents: [Object],
      auth: undefined,
      hostname: 'devnet.bundlr.network',
      port: '443',
      nativeProtocols: [Object],
      pathname: '/tx/solana'
    },
    _ended: false,
    _ending: true,
    _redirectCount: 0,
    _redirects: [],
    _requestBodyLength: 1858760,
    _requestBodyBuffers: [ [Object] ],
    _onNativeResponse: [Function (anonymous)],
    _currentRequest: ClientRequest {
      _events: [Object: null prototype],
      _eventsCount: 2,
      _maxListeners: undefined,
      outputData: [],
      outputSize: 0,
      writable: true,
      destroyed: true,
      _last: true,
      chunkedEncoding: false,
      shouldKeepAlive: false,
      _defaultKeepAlive: true,
      useChunkedEncodingByDefault: true,
      sendDate: false,
      _removedConnection: false,
      _removedContLen: false,
      _removedTE: false,
      _contentLength: null,
      _hasBody: true,
      _trailer: '',
      finished: false,
      _headerSent: true,
      _closed: false,
      socket: [TLSSocket],
      _header: 'POST /tx/solana HTTP/1.1\r\n'  
        'Accept: application/json, text/plain, */*\r\n'  
        'Content-Type: application/octet-stream\r\n'  
        'User-Agent: axios/0.25.0\r\n'  
        'Content-Length: 1858760\r\n'  
        'Host: devnet.bundlr.network\r\n'  
        'Connection: close\r\n'  
        '\r\n',
      _keepAliveTimeout: 0,
      _onPendingData: [Function: nop],
      agent: [Agent],
      socketPath: undefined,
      method: 'POST',
      maxHeaderSize: undefined,
      insecureHTTPParser: undefined,
      path: '/tx/solana',
      _ended: false,
      res: null,
      aborted: true,
      timeoutCb: null,
      upgradeOrConnect: false,
      parser: [HTTPParser],
      maxHeadersCount: null,
      reusedSocket: false,
      host: 'devnet.bundlr.network',
      protocol: 'https:',
      _redirectable: [Circular *1],
      [Symbol(kCapture)]: false,
      [Symbol(kNeedDrain)]: true,
      [Symbol(corked)]: 0,
      [Symbol(kOutHeaders)]: [Object: null prototype],
      [Symbol(kError)]: undefined
    },
    _currentUrl: 'https://devnet.bundlr.network:443/tx/solana',
    _timeout: null,
    [Symbol(kCapture)]: false
  },
  response: undefined,
  isAxiosError: true,
  toJSON: [Function: toJSON]
}
upload was not successful, please re-run. Error: timeout of 60000ms exceeded
    at createError (/Users/silachim/Desktop/newmetaplex/metaplex/js/node_modules/@)
    at RedirectableRequest.handleRequestTimeout (/Users/silachim/Desktop/newmetapl)
    at RedirectableRequest.emit (node:events:394:28)
    at RedirectableRequest.emit (node:domain:470:12)
    at Timeout.<anonymous> (/Users/silachim/Desktop/newmetaplex/metaplex/js/node_m)
    at listOnTimeout (node:internal/timers:557:17)
    at processTimers (node:internal/timers:500:7) {
  config: {
    transitional: {
      silentJSONParsing: true,
      forcedJSONParsing: true,
      clarifyTimeoutError: false
    },
    adapter: [Function: httpAdapter],
    transformRequest: [ [Function: transformRequest] ],
    transformResponse: [ [Function: transformResponse] ],
    timeout: 60000,
    xsrfCookieName: 'XSRF-TOKEN',
    xsrfHeaderName: 'X-XSRF-TOKEN',
    maxContentLength: 536870912,
    maxBodyLength: Infinity,
    validateStatus: [Function: validateStatus],
    headers: {
      Accept: 'application/json, text/plain, */*',
      'Content-Type': 'application/octet-stream',
      'User-Agent': 'axios/0.25.0',
      'Content-Length': 1858760
    },
    baseURL: 'https://devnet.bundlr.network:443',
    method: 'post',
    url: 'https://devnet.bundlr.network:443/tx/solana',
    data: <Buffer 02 00 43 1a a3 32 bd 0f 38 ab b9 9f e1 a4 e7 23 f3 f9 1e 16 46 9a ba 08>
  },
  code: 'ECONNABORTED',
  request: <ref *1> Writable {
    _writableState: WritableState {
      objectMode: false,
      highWaterMark: 16384,
      finalCalled: false,
      needDrain: false,
      ending: false,
      ended: false,
      finished: false,
      destroyed: false,
      decodeStrings: true,
      defaultEncoding: 'utf8',
      length: 0,
      writing: false,
      corked: 0,
      sync: true,
      bufferProcessing: false,
      onwrite: [Function: bound onwrite],
      writecb: null,
      writelen: 0,
      afterWriteTickInfo: null,
      buffered: [],
      bufferedIndex: 0,
      allBuffers: true,
      allNoop: true,
      pendingcb: 0,
      constructed: true,
      prefinished: false,
      errorEmitted: false,
      emitClose: true,
      autoDestroy: true,
      errored: null,
      closed: false,
      closeEmitted: false,
      [Symbol(kOnFinished)]: []
    },
    _events: [Object: null prototype] {
      response: [Function: handleResponse],
      error: [Function: handleRequestError],
      socket: [Array]
    },
    _eventsCount: 3,
    _maxListeners: undefined,
    _options: {
      maxRedirects: 21,
      maxBodyLength: Infinity,
      protocol: 'https:',
      path: '/tx/solana',
      method: 'POST',
      headers: [Object],
      agent: undefined,
      agents: [Object],
      auth: undefined,
      hostname: 'devnet.bundlr.network',
      port: '443',
      nativeProtocols: [Object],
      pathname: '/tx/solana'
    },
    _ended: false,
    _ending: true,
    _redirectCount: 0,
    _redirects: [],
    _requestBodyLength: 1858760,
    _requestBodyBuffers: [ [Object] ],
    _onNativeResponse: [Function (anonymous)],
    _currentRequest: ClientRequest {
      _events: [Object: null prototype],
      _eventsCount: 2,
      _maxListeners: undefined,
      outputData: [],
      outputSize: 0,
      writable: true,
      destroyed: true,
      _last: true,
      chunkedEncoding: false,
      shouldKeepAlive: false,
      _defaultKeepAlive: true,
      useChunkedEncodingByDefault: true,
      sendDate: false,
      _removedConnection: false,
      _removedContLen: false,
      _removedTE: false,
      _contentLength: null,
      _hasBody: true,
      _trailer: '',
      finished: false,
      _headerSent: true,
      _closed: false,
      socket: [TLSSocket],
      _header: 'POST /tx/solana HTTP/1.1\r\n'  
        'Accept: application/json, text/plain, */*\r\n'  
        'Content-Type: application/octet-stream\r\n'  
        'User-Agent: axios/0.25.0\r\n'  
        'Content-Length: 1858760\r\n'  
        'Host: devnet.bundlr.network\r\n'  
        'Connection: close\r\n'  
        '\r\n',
      _keepAliveTimeout: 0,
      _onPendingData: [Function: nop],
      agent: [Agent],
      socketPath: undefined,
      method: 'POST',
      maxHeaderSize: undefined,
      insecureHTTPParser: undefined,
      path: '/tx/solana',
      _ended: false,
      res: null,
      aborted: true,
      timeoutCb: null,
      upgradeOrConnect: false,
      parser: [HTTPParser],
      maxHeadersCount: null,
      reusedSocket: false,
      host: 'devnet.bundlr.network',
      protocol: 'https:',
      _redirectable: [Circular *1],
      [Symbol(kCapture)]: false,
      [Symbol(kNeedDrain)]: true,
      [Symbol(corked)]: 0,
      [Symbol(kOutHeaders)]: [Object: null prototype],
      [Symbol(kError)]: undefined
    },
    _currentUrl: 'https://devnet.bundlr.network:443/tx/solana',
    _timeout: null,
    [Symbol(kCapture)]: false
  },
  response: undefined,
  isAxiosError: true,
  toJSON: [Function: toJSON]
}

i suspect the problem must have to do with the size of the assets file. When i upload the sample collection provided by metaplex the upload is succesful however whenever i upload a custom one, the upload fails.

CodePudding user response:

Candymachine Uploads through Bundlr on Devnet I believe are limited to a 10mb upload limit last that I knew.

What size are your files that you are trying to upload?

CodePudding user response:

It's okay to reduce the size of your collection for a test deploy on devnet, however I recommend you guys use a private gateway for upload and deploy to mainnet.

A great one is QuickNode's Solana Mainnet here: https://www.quicknode.com/pricing

The 9$ plan is enough for me, but if you plan to use the endpoint as well for your community in production (e.g minting) I suggest you upgrade to Build (49$)

I hope this helps!

  • Related