Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

130
Visualizações
Vercel causing high reads and active connections in Google Firebase

I have a web app built with Nextjs and hosted on Vercel that uses Firebase for storing data. Currently I have a collection of 33 documents, which all have 17 fields. Then I have a function that gets all those records when a user lands on the index page.

My code for fetching the data is:

const getData = async () => {
  const q = query(collection(firestore, "data"), where("published", "==", true));
  const querySnapshot = await getDocs(q);
  return querySnapshot.docs.map(doc => ({id: doc.id, ...doc.data()}))
}

However, my usage tab shows a huge peak any time I refresh the page to get the data: image showing usage peak when I refreshed the page

I just don't understand how one load can cause 2.5k reads and 19 active connections. Is this normal? No-one else is using the app simultaneously, since it's not public yet.

I don't really know how to begin debugging the problem, so all suggestions are welcome!

EDIT: I have narrowed the problem down to my live app deployed on Vercel. High reads / active connections are not an issue when navigating around my app in localhost.

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda