How to investigate and prevent sudden Edge Request spikes on Vercel

Hello - For reasons unbeknownst to me, the usage of edge resources on a simple database app spiked in one day.

Goals

  • To realize what I did wrong with a particular deployment
  • To take corrective actions to lower Edge Requests usage

App Information

  • Framework: NestJS with Next.js frontend
  • Database: NeonDB connection
  • Backend URL: https://bizforecaster-api.vercel.app/
  • Frontend URL: https://bizforecaster.vercel.app/

Current Behavior

I have been testing the app for a few months but suddenly on 03/28, the Edge Requests and the number of Vercel Functions jumped to 1,000,000 hits. The app has no visitors and I am the only user/tester. Analytics is now turned on, yet I am still the only user and visitor of the app.

Questions

  1. How do I investigate this sudden spike on resource usage that occurred on one particular day?
  2. How do I prevent getting suspended, considering that I am over the limit without knowing why?

Thank you.


Could you check your Edge Requests for suspicious user agents, IP addresses, or referrers?

I recommend enabling Attack Challenge Mode just in case. Go to your project settings → Firewall → Bot Management → Enable Attack Challenge Mode.

This is FREE and won’t count blocked requests against your usage.

I recommend:

  • Set up Spend Management to prevent future surprises (even on Hobby)
  • Consider custom firewall rules to block specific bad actors you identify
  • Enable Vercel’s Bot Protection managed ruleset for ongoing protection