#Getting over 10,000 errors from a single user

26 messages · Page 1 of 1 (latest)

cerulean fern
#

I have a single IP address that is causing me to have 10,000+ errors due to Clerk JS not being able to refresh a token 😬 I have alerted the clerk team in their Discord channel, but I figured I would bring it to the attention of the Sentry team. This happened overnight and the errors keep pouring in every couple of seconds. The odd thing is, I don't have active users at the moment on my site when these errors are coming in.

carmine orchid
#

Disable your DSN to stop the flood

#

Also maybe even straight up replace the DSN to prevent the errors still piling up after you re-enable to for a while.

cerulean fern
#

Where do I do that at? 👀

#

Disabling it that is

#

Found it

carmine orchid
#

Great! You can re-enable it later if you want or just delete it and create a new one and deploy that.

cerulean fern
#

Yea I think the issue is someone has a tab just opened in their browser and just left it open... Clerk so far has said the error message is usually associated with a dev instance but Sentry shows it's on production and the replay URL is my production URL.

carmine orchid
#

I have no experience with Clerk but I have made the mistake myself of an infinite retry loop and this sounds about right. Especially if you have replays it should be pretty clear what is happening and someone just having a tab open will certainly happen for some people.

cerulean fern
#

Yea it started 22 hours ago 😭 and the reply was just someone viewing an article so they moved around from pages protected by Clerk.js (auth) to a page that was not protected by auth 😅

carmine orchid
#

Fun times 😦

#

Hopefully you are all good now on the Sentry side

#

Let us know if there is anything else we can help you with!

cerulean fern
#

Will do

cerulean fern
#

They’re suggesting I enable rate limiting but that’s not possible as this is a free tier correct?

cerulean fern
#

Alex is there a way to get the full error? It seems like the error being displayed in Sentry is cut off

carmine orchid
#

Correct. Rate limiting is only on business plans and up. There is spike protection but that eventually will loose it’s use after a while (when it’s no longer a spike but a constant stream).

#

You can download the event json that might contain more info but I don’t think so.

high bronze
#

@cerulean fern Can you share a link to the event? I'd like to take a look whether we can improve the capturing of the error somehow via the SDK.

cerulean fern
#
#
high bronze
#

Thanks! Yeah we have a limit for error messages (which I absolutely hate since errors are literally Sentry's thing).

#

I'll try to get the ball rolling to allow for longer messages.

#

As a workaround you can add this to your Sentry.init() calls:


  beforeSend(event, hint) {
    if (hint.originalException) {
      event.extra = event.extra || {};
      event.extra.full_error_message = String(hint.originalException)
    }
    return event;
  },
#

It should dump the entire raw stacktrace into your issue events.