WebApplication._HandleHTTPReques Out Of Bounds Error Randomly Occurrs

Hi all,

Somewhere between 1-10 times a day, I’ll see this on various Xojo web applications I have running on Windows Server 2019 Datacenter v1809 (the latest) I’ll see the following error logged:

The following error has occurred at APP: 0_ has occurred.

Error type: OutOfBoundsException

Stack information: 

WebApplication._HandleHTTPRequest%%o<WebApplication>o<_HTTPServer.HTTPRequestContext>
_HTTPServer.HTTPRequestThread.Event_Run%%o<_HTTPServer.HTTPRequestThread>

This happens on very busy production apps and hardly-ever-touched testing apps, so I don’t think it’s usage or traffic related.

These apps are hosted on an AWS EC2 instance and behind an AWS Elastic Load Balancer.

Does anyone know the cause of this error? There’s definitely (especially as of late with AI “bots” trying to scrape everything under the Sun) a fair amount of random attempts.

Is this just noise from “malformed” attempts to connect to the app by various bots/scrapers?

FYI - I already reject (and log) any connections (via HandleURL event) who’s WebRequest.Method value <> “GET”.

Is there a way to better handle spammy requests? Are they the cause of these occasional OutOfBoundsException errors?

Any insight from someone on the Xojo team (or someone from the community who’s solved this issue) would be greatly appreciated.

Tagging @Ricardo_Cruz

Thanks so much,
Anthony

Hi @Anthony_Dellos,

Sorry to hear that. That’s an exception happening deep inside the framework. I’ll have to take a look and see what could be throwing the exception.

Could you please create an Issue? (it’s fine if you cannot provide a sample project in this case)

I have seen this, also, seldomly

Thanks for confirming @Ricardo_Cruz

I will create an issue tomorrow morning.

Anthony

1 Like

If possible, can it be public? I’d like to follow along because I have seen these on occasion as well.

@Anthony_Dellos don’t worry about creating the case, I’ll create one.

Here it is, Issue #79780. It should be fixed in 2025r3, but please let me know if you continue seeing those errors in your logs in the future.

2 Likes

Thanks so much, @Ricardo_Cruz !

Have a great day,
Anthony

1 Like

Hi @Ricardo_Cruz :waving_hand:

Found a different, but similar type of error:

The following information was included with the event: 

The following error has occurred at SESSION: 0_ has occurred for user: *********** 

Error type: OutOfBoundsException

Stack information: 

WebSegmentedButton._SelectSegment%b%o<WebSegmentedButton>i8b
WebSegmentedButton._ExecuteEvent%b%o<WebSegmentedButton>so<JSONItem>
WebSession._HandleBatchEvent%%o<WebSession>so<JSONItem>o<_HTTPServer.HTTPRequestContext>
WebSession._HandleRequest%i8%o<WebSession>so<_HTTPServer.HTTPRequestContext>
WebApplication._HandleHTTPRequest%%o<WebApplication>o<_HTTPServer.HTTPRequestContext>
_HTTPServer.HTTPRequestThread.Event_Run%%o<_HTTPServer.HTTPRequestThread>

(I anonymized the user info, but it was an actual user with an active session; this happened when the site was pretty busy; 50+ sessions, fyi)

This feels like a framework error too, yes?

Let me know if you need me to create an issue for this one or would you rather set it up yourself like you did for the similar issue mentioned above?

Anthony