LogicTrail
  • Trails
  • Check my app
  • Pricing
  • Sign in
  1. Trails
  2. /
  3. Bills that explode
  4. · 4 minutes · Pro

2 million requests from one tab

You left your dashboard open overnight. Your database usage page shows 2 million requests from a single browser.

This answers: Why is my useEffect fetching in an infinite loop? No coding needed. 2 quick decisions.

  • Costs and abuse
  • Debugging without panic

Checking your access…

Why is my useEffect fetching in an infinite loop?

The effect changes one of its own dependencies, for example setting a state object it depends on, so every run triggers another run. Remove the self-update, depend only on values that really change, and watch the for repeating requests. Select only the columns you display to reduce .

Trail of the bug
  1. Browser
  2. Your server
  3. Database

Breaks at Browser: Effect re-runs itself forever

How it works

Requests per day: people vs bots
People Bots
MonTueWedThuFriSatSun
Fri: 14,800 bot requests
Requests per day
DayPeopleBots
Mon180260
Tue210300
Wed1609400
Thu19012100
Fri23014800
Sat12013300
Sun11011900
From Wednesday, crawlers send thousands of requests a day. On usage-based hosting each one is billed, whoever sent it.

Why AI tools write this bug

Generated components often add 'refresh' state updates inside effects, which is invisible until a page is left open.

How to fix it

  1. Open the and look for repeating requests.

3 more steps, and a prompt that checks your own app for this bug. Part of Pro.

Unlock

Common questions

What is egress?
Data sent out of your database or storage. Many providers bill for it per gigabyte.

Related scenarios

  • Twelve requests on the home pagePro · 4 min
  • The save that saved nothingFree · 4 min
  • The open summarise buttonFree · 4 min

More on this trail

Bills that explode: Open AI endpoints, bot traffic, fake signups and functions that loop forever.

Want someone to look?

We check AI-built apps for this and three other common leaks, in plain English.

Check my app
Sign in

Sign in to walk this one

2 decisions, about 4 minutes, and a prompt to check your own app for the same problem.

Sign in No password. We email you a link.

How to fix it

  1. Open the and look for repeating requests.

3 more steps, and a prompt that checks your own app for this bug. Part of Pro.

Unlock