Green-Party-of-Canada-Members / gpc-decidim

Decidim For the Green Party of Canada
https://wedecide.green.ca/
GNU Affero General Public License v3.0
1 stars 0 forks source link

Server timeout for submitter trying to access proposals with many comments #119

Open BigSnicker opened 10 months ago

BigSnicker commented 10 months ago

A participant cannot view his own proposals because he gets a Cloudflare timeout. We believe it's related to the large number of comments (>100) his proposal has received, as the error is occurring on multiple proposals with a lot of comments.

To replicate:

Note that the timeout occurs only for the submitter. Other users can access the proposal without any problems.

BigSnicker commented 10 months ago

Email from the user:

I've found I can reply to existing comments like this... http://wedecide.green.ca/processes/create-proposals/f/457/proposals/4213?commentId=2027#comment_2027

...because by specifying an existing comment, all the 118 comments are not rendered, just the comment I can reply to. (Until I get to 4th level of nested replies, as GPC only allows 4 levels of nested replies.)

But, as you know, if I try look at all 188 comments... https://wedecide.green.ca/processes/create-proposals/f/457/proposals/4213 ...it times out at about 1 minute.

Also, Colin's proposal times out for me too now that he's at 78 comments. https://wedecide.green.ca/processes/create-proposals/f/457/proposals/4125

...it didn't before. So I'm guessing I've passed a threshold just under 78 comments.

And when I look at all-comments, when logged-in, on this proposal (16 comments)... https://wedecide.green.ca/processes/create-proposals/f/457/proposals/4121 ...it takes me about 20 seconds logged in, and 1 seconds logged out.

https://wedecide.green.ca/processes/create-proposals/f/457/proposals/4165 ...takes me 14 seconds logged in, and 1 second logged out.

paarals commented 9 months ago

@BigSnicker should we do the pagination task?

BigSnicker commented 9 months ago

Step #1 was to do the upgrade to V.27 and see if the Ajax work helped the responsiveness.

If:

  1. the proposals with many comments continue to be slow after the upgrade, and,
  2. the pagination work is relatively easy (< 4 hours), then

Yes! (and notifying @Laurence-Montgomery )

BigSnicker commented 9 months ago

I should add... if the pagination work is VERY easy (e.g .turning on a gem option) , then just do it.

paarals commented 9 months ago

related to #108