Skip to content

Asynchronous call times out in production #368

@mishaetaya

Description

@mishaetaya

the API works fine on localhost, but as soon as I run the async operation in production (on heroku) I get the following error after a few minutes:

Error: Total timeout exceeded before any response was received
  at Timeout._onTimeout (/app/node_modules/google-gax/lib/longrunning.js:347:11)
  at retry (/app/node_modules/google-gax/lib/longrunning.js:327:31)
   at Timer.listOnTimeout (timers.js:207:5)
   at ontimeout (timers.js:365:14)
    at tryOnTimeout (timers.js:237:5)

the operation.promise() never resolves. Any guidance on this?

speech.startRecognition(googleFileUrl, config)
   .then((results) => {
    const operation = results[0];
    return operation.promise();
  })
  .then((results) => {
     var transcription = results[0];
      console.log(`Transcription: ${transcription}`);
  })
  .catch((err) => {
    console.error('Transcription error:', err);
  });

Metadata

Metadata

Assignees

No one assigned

    Labels

    🚨This issue needs some love.triage meI really want to be triaged.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions