USGS-WiM/NSSServices

Regression Query Timeout with Large Basin

Closed this issue · 10 comments

It looks like we're getting a timeout issue when querying regression regions if the basin is too big.

Lat/long:
44.05755375355734, -91.64035320281982

Getting the following error after 2 minutes:
image

We can see if .net core or ef core have request timeouts. I'll add the polygon coordinates below for a test request.

POST request to /regressionregions/bylocation with the following json body:
example.txt

@aaronstephenson does the error in this issue look familiar to you at all? I'm getting it around the 2 minute mark on a call to our .NET core services. It's a call that makes a database query based on the polygon, and this polygon is especially large. It's only failing on the servers (prod and test), not when I'm running the services locally.

I tried adjusting the timeouts and max request lengths in IIS but I'm not getting anywhere.

@kjacobsen16 If it errors out at exactly the two minute mark, that sounds like a timeout error. How long does the query take when it runs on your laptop? We can increase the timeout limit on the servers.

@aaronstephenson it takes about two and a half minutes locally. Can you steer me towards where to change the timeout limit? I tried several places and none of them worked.

It's a setting in IIS. Go to the server -> sites -> default web site -> advanced settings (in the far right panel) -> limits -> connection time out.

image

@aaronstephenson I tried this and no luck. Do I need to reboot or do anything to make it stick?

You have to restart the website. I also like to restart the IIS service when changing higher-level settings like this, just to be safe.

Hm, that didn't fix it either. I even rebooted the test server just to cover all bases, but I'm still getting the error message.

Hmm, it may be something in the app code then. Or possibly in the way the ASP app pool is configured. @fanguyc-usgs can you take this over and help Katrin troubleshoot?

Fixed - thanks @fanguyc-usgs

(note that we needed to change the timeout setting in the asp net core node in the application's web config)