404 when creating high volume of Tasks

performance

(adam.white) #1

When deploying a project to 180+ tenants Octopus will work for about a minute and then throw up a 404 error:

Thankfully the error only impacts the user experience as the tasks are created, you just have to refresh the Tasks view to see them.


(Shane Gill) #2

Hi Adam,

Thanks for getting in touch.

I tried to reproduce the error you are seeing by creating deployments to 500 tenants. It generally took 2 minutes to create all of the deployments but I haven’t encountered the 404 error you are seeing.

If this is happening consistently, could you capture the network traffic while you are creating the deployments and send the capture? For Chrome, you can use network tools and save a HAR file (there is a good walkthrough here: https://support.zendesk.com/hc/en-us/articles/204410413-Generating-a-HAR-file-for-troubleshooting) or use FiddlerCap from here: https://www.telerik.com/fiddler/fiddlercap.

Thanks,
Shane


(adam.white) #3

I have generated a har file and sent it to you directly. Happy to carry on the conversation here once you have reviewed the file.


(Shane Gill) #4

Thanks Adam,

Your HAR shows a deployment being created for each tenant and then a request to /api/tasks?ids=.... which is supposed to return all of the tasks related to the tenants but instead returns a 404.

When you refresh the tasks view is it showing the filtered list of tasks for the deployments you just created? ie the url is app#/tasks?ids=.....?

Trying to determine if the filtered tasks API call is always returning 404, or only immediately after you have created the deployments.

Cheers,
Shane


(adam.white) #5

If I refresh the screen with the 404 message on nothing happens. However if I load up the Tasks view directly then I can see all the tasks successfully created.


(adam.white) #6

It appears to be due to the length of the URL. At 2096 characters long it loads fine. As soon as I add the 2097th it 404 errors.


(Shane Gill) #7

Hi Adam,

It looks like the query string length has been restricted to 2048 characters which was a limit in Internet Explorer. It could also be caused by a firewall or similar restricting the query string length.

Taking a closer look at your HAR file, the 404 is not coming from Octopus:

404 - File or directory not found.
The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.

Octopus would respond with:

Opps! Something went wrong…

Cheers,
Shane


(adam.white) #8

Good spot! The issue was that IIS has a default querystring length of 2048. I’ve upped this for the website and the error has gone away.

Thanks!