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

143
Vistas
Firebase Cloud Function finished with status: 'response error'

I have a cloud function that is returning a lot of data (50'000 documents) as objects. When I run it I get the error finished with status: 'response error'.

This only happens when I export all of the data, when a limit (up to 20'000) is applied it works without problem. This lets me think that the response might be too big, but there is no info in the logs about this at all. Also adding try / catch does not work. In the console I only get the above message without any further indication.

I know that functions normally log when timeout is hit or the memory exceeded, so I am wondering what else could be the source of error.

exports.run = functions.runWith({ timeoutSeconds: 540, memory: '8GB' }).https.onRequest(async (req, res) => {
  try {
    const querySnap = await db.collection("myData").get();
    const data = querySnap.docs.map(doc => doc.data());
    return res.status(200).json({
      data: data
    }).end();

  } catch (err) {
    console.log(err);
    return res.status(400).end();
  }
});

EDIT: It is indeed the size of the response that causes this error. You can reproduce this if you simply return data of given size (with Buffer.alloc(bytes)).

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

I thins you hit the max HTTP response size which is 10 MB for HTTP functions

Reference : https://cloud.google.com/functions/quotas#resource_limits with the screenshot below take from that ref.

enter image description here

about 4 years ago · Juan Pablo Isaza Denunciar
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