Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

185
Vistas
GCP MetricServiceClient gets Error: 14 UNAVAILABLE

I have a Cloud function(node 10) that sends metrics using (@google-cloud/monitoring) MetricServiceClient.

I send 25 metrics using async-await syntax once a day (there is a similar task in another project at the same time).

  const request = {
    name: client.projectPath(projectId),
    timeSeries: [timeSeriesData],
  };

  const options = {
    timeout: 120000
  };

  try {
    await client.createTimeSeries(request, options);
    return Promise.resolve();
  } catch (error) {
    console.error(error);
    throw error;

But from time to time I get an error on the environment(but can't reproduce it locally)

{ Error: 14 UNAVAILABLE: Deadline expired before operation could complete.
at Object.callErrorFromStatus (/workspace/node_modules/@grpc/grpc-js/build/src/call.js:31:26)
at Object.onReceiveStatus (/workspace/node_modules/@grpc/grpc-js/build/src/client.js:179:52)
at Object.onReceiveStatus (/workspace/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:336:141)
at Object.onReceiveStatus (/workspace/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:299:181)
at process.nextTick (/workspace/node_modules/@grpc/grpc-js/build/src/call-stream.js:145:78)
at process._tickCallback (internal/process/next_tick.js:61:11)
code: 14,
details: 'Deadline expired before operation could complete.', 
metadata:
Metadata {internalRepr: Map { 'grpc-server-stats-bin' => [Array] }, options: {} } }

I checked different values for the timeout option but it seems that it isn't connected:

  • this error can appear sooner than the specified timeout option (13 000 ms with 120 000 ms timeout value)
  • if we poot a really small timeout we will have a different error Error: 4 DEADLINE_EXCEEDED: Deadline exceeded that I tracked down by source code.

I assume error details probably go from server-side @grpc/grpc-js/src/call-stream.ts line 592.

if (this.internalError.code === 'ECONNRESET') {
                  code = Status.UNAVAILABLE;
                  details = this.internalError.message;

Does anyone know where it might come from?

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda