MODiX icon indicating copy to clipboard operation
MODiX copied to clipboard

Investigate timeout on promotions page

Open patrickklaeren opened this issue 6 years ago • 5 comments

I've been regularly receiving the following error:

image

It looks like we're pulling through all promotions, here https://github.com/discord-csharp/MODiX/blob/master/Modix/Controllers/PromotionController.cs#L24-L29 which may be unfavorable in this particular scenario and leads to timeouts.

patrickklaeren avatar Aug 28 '19 09:08 patrickklaeren

5000 is also quite a low number... but yeah, this view needs to be properly paged at this point

Cisien avatar Aug 28 '19 17:08 Cisien

I'm also getting this error when I go to promotions at the moment.

333fred avatar Aug 29 '19 05:08 333fred

Refreshed a few times and now it's working again ¯_(ツ)_/¯

333fred avatar Aug 29 '19 05:08 333fred

I also did notice some other modix issues earlier today: https://discordapp.com/channels/143867839282020352/251386218351165441/616427466692755466 and https://discordapp.com/channels/143867839282020352/312132327348240384/616427414708420643, for example, MODiX didn't respond. Could be related?

333fred avatar Aug 29 '19 05:08 333fred

The modix db is now on the smallest possible instance of postgress/azure sql, and in a different physical location (about 25ms latency). If these calls make a lot of database calls, the latency would add up to something that could time out.

I don't see any indication that the sql instance is stressed for resources from the database's point of view.

We didn't get any error when your quote failed, so i don't think it's related. The promo page is loading a ton of data and most of it is not used, so the fix here is to prune that down to reasonable numbers.

Cisien avatar Aug 30 '19 00:08 Cisien

As part of a new effort to refocus on priorities, I will close this. If you feel this is imperative to the bot, a new issue can be opened to supersede this.

patrickklaeren avatar Mar 26 '24 14:03 patrickklaeren