Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some challenges failing to load #306

Closed
braxler opened this issue Jan 29, 2021 · 13 comments · Fixed by #322
Closed

Some challenges failing to load #306

braxler opened this issue Jan 29, 2021 · 13 comments · Fixed by #322

Comments

@braxler
Copy link
Contributor

braxler commented Jan 29, 2021

Some challenges are failing to load. Only pattern I've noticed is that the higher the entries the more likely it is to fail.

One example:
http://www.vimgolf.com/challenges/5192f96ad8df110002000002
"We're sorry, but something went wrong."

@Hettomei
Copy link
Contributor

Currently Threre is a lot of 'Sort exceeded memory limit' error :

your challenge return :

2021-01-29T21:25:41.655963+00:00 app[web.1]: Started GET "/challenges/5192f96ad8df110002000002" for 162.158.114.121 at 2021-01-29 21:25:41 +0000
2021-01-29T21:25:41.658176+00:00 app[web.1]: I, [2021-01-29T21:25:41.658085 #12]  INFO -- : Processing by ChallengesController#show as HTML
2021-01-29T21:25:41.658294+00:00 app[web.1]: I, [2021-01-29T21:25:41.658227 #12]  INFO -- :   Parameters: {"id"=>"5192f96ad8df110002000002"}
2021-01-29T21:25:41.693017+00:00 app[web.1]: Rendering challenges/show.erb within layouts/application
2021-01-29T21:25:41.739889+00:00 app[web.1]: Rendered shared/_challenge_description.erb (0.3ms)
2021-01-29T21:25:41.789459+00:00 app[web.1]: Rendered challenges/show.erb within layouts/application (96.2ms)
2021-01-29T21:25:41.789805+00:00 app[web.1]: I, [2021-01-29T21:25:41.789709 #12]  INFO -- : Completed 500 Internal Server Error in 131ms
2021-01-29T21:25:41.792171+00:00 app[web.1]:
2021-01-29T21:25:41.792248+00:00 app[web.1]: ActionView::Template::Error (Sort exceeded memory limit of 33554432 bytes, but did not opt in to external sorting. (292)):
2021-01-29T21:25:41.792516+00:00 app[web.1]: 11:     <p>Check out <a href="/about#resources"> these helpful resources</a> to improve your Vim skills... <em>Game on.</em></p>
2021-01-29T21:25:41.792517+00:00 app[web.1]: 12:
2021-01-29T21:25:41.792519+00:00 app[web.1]: 13: <% if !current_user %>
2021-01-29T21:25:41.792520+00:00 app[web.1]: 14:     <div class="note clearfix">Unlock <b><%= @submissions.count_remaining %></b> remaining solutions by <b><%= link_to "signing in", "/auth/twitter?x_auth_access_type=read&use_authorize=true" %></b> and submitting your own entry</div>
2021-01-29T21:25:41.792520+00:00 app[web.1]: 15:   <% elsif @submissions.count_remaining > 0 %>
2021-01-29T21:25:41.792521+00:00 app[web.1]: 16:     <div class="note clearfix">Unlock <b><%= @submissions.count_remaining %></b> remaining solutions by submitting a higher ranked entry</div>
2021-01-29T21:25:41.792522+00:00 app[web.1]: 17: <% end %>
2021-01-29T21:25:41.792583+00:00 app[web.1]:
2021-01-29T21:25:41.792643+00:00 app[web.1]: app/repositories/repository_challenge.rb:216:in `first'
2021-01-29T21:25:41.792644+00:00 app[web.1]: app/repositories/repository_challenge.rb:216:in `worst_score'
2021-01-29T21:25:41.792645+00:00 app[web.1]: app/services/submissions.rb:65:in `worst_score'
2021-01-29T21:25:41.792645+00:00 app[web.1]: app/services/submissions.rb:46:in `visible_score'
2021-01-29T21:25:41.792646+00:00 app[web.1]: app/services/submissions.rb:99:in `count_remaining'
2021-01-29T21:25:41.792646+00:00 app[web.1]: app/views/challenges/show.erb:14:in `_app_views_challenges_show_erb__3371893031817762190_41338200'
2021-01-29T21:25:41.793841+00:00 app[web.1]: source=rack-timeout id=174c39a3-3d36-4a73-8122-245db46ddcad wait=9ms timeout=15000ms service=139ms state=completed
2021-01-29T21:25:41.809957+00:00 heroku[router]: at=info method=GET path="/challenges/5192f96ad8df110002000002" host=www.vimgolf.com request_id=174c39a3-3d36-4a73-8122-245db46ddcad fwd="2a01:e0a:52a:15a0:6eb2:9b7f:d6b:fdb3,162.158.114.121" dyno=web.1 connect=0ms service=161ms status=500 bytes=956 protocol=http

another page with error is /challenge/challenge_id/user/username

2021-01-29T21:20:19.670882+00:00 heroku[router]: at=info method=GET path="/challenges/5f0f5fbe280fbf000c233304/user/bittfaulk" host=www.vimgolf.com request_id=60c964e1-23d0-405d-8be5-d4ec53f76d25 fwd="64.62.252.174,172.69.22.40" dyno=web.1 connect=0ms service=385ms status=200 bytes=7160 protocol=http
2021-01-29T21:20:19.734896+00:00 app[web.1]: Rendered shared/_submissions.erb (45.9ms)
2021-01-29T21:20:19.849004+00:00 app[web.1]: Rendered shared/_challenge_credits.erb (68.4ms)
2021-01-29T21:20:19.849093+00:00 app[web.1]: Rendered challenges/user.erb within layouts/application (243.8ms)
2021-01-29T21:20:19.849343+00:00 app[web.1]: I, [2021-01-29T21:20:19.849249 #9]  INFO -- : Completed 500 Internal Server Error in 316ms
2021-01-29T21:20:19.850935+00:00 app[web.1]: 
2021-01-29T21:20:19.851024+00:00 app[web.1]: ActionView::Template::Error (Sort exceeded memory limit of 33554432 bytes, but did not opt in to external sorting. (292)):
2021-01-29T21:20:19.851187+00:00 app[web.1]: 11: </h5>
2021-01-29T21:20:19.851187+00:00 app[web.1]: 12:
2021-01-29T21:20:19.851188+00:00 app[web.1]: 13: <h2 style="padding-bottom:1em; border-bottom: 1px dotted;">
2021-01-29T21:20:19.851195+00:00 app[web.1]: 14:     <b class="stat"><%= show_challenge.count_uniq_users %></b> active golfers, <b class="stat"><%= show_challenge.count_entries %></b> entries
2021-01-29T21:20:19.851195+00:00 app[web.1]: 15: </h2>
2021-01-29T21:20:19.851243+00:00 app[web.1]: 
2021-01-29T21:20:19.851305+00:00 app[web.1]: app/repositories/repository_challenge.rb:195:in `first'
2021-01-29T21:20:19.851305+00:00 app[web.1]: app/repositories/repository_challenge.rb:195:in `sum_lines'
2021-01-29T21:20:19.851306+00:00 app[web.1]: app/repositories/repository_challenge.rb:271:in `count_uniq_users'
2021-01-29T21:20:19.851306+00:00 app[web.1]: app/services/show_challenge.rb:35:in `count_uniq_users'
2021-01-29T21:20:19.851307+00:00 app[web.1]: app/views/shared/_challenge_credits.erb:14:in `_app_views_shared__challenge_credits_erb__1786572738972739987_31527600'
2021-01-29T21:20:19.851307+00:00 app[web.1]: app/views/challenges/user.erb:26:in `_app_views_challenges_user_erb___3763864613171643667_37964340'

@nazzacode
Copy link

Also experiencing this. Almost all challenges unplayable.

@AckslD
Copy link

AckslD commented Feb 14, 2021

Me too

@tobiabocchi
Copy link

Same problem here

@Hettomei
Copy link
Contributor

@igrigorik can I do some revert and restart heroku ?

@Hettomei
Copy link
Contributor

@igrigorik I deployed an old commit (see #307 (comment)) and got the same error. (and deployed back to current master)

I don't have time to dig in mongodb's behavior.

@igrigorik
Copy link
Owner

It's suspect that this started recently.. 🤔

@countvajhula
Copy link

@igrigorik I've been checking the site over the last few weeks and haven't been able to access the challenges. I made a mention of this in an unrelated post in the reddit Vim community, hope I'm not overstepping there (and if so, I'll gladly remove the mention). But if you guys do need help, it might not be a bad idea to continue the conversation.

@Hettomei
Copy link
Contributor

@countvajhula

We need help

More technical details here #307

But we need @igrigorik to give us access to mongodb logs.

@countvajhula
Copy link

@Hettomei Ok, I've updated the post with a link to that ticket. If you guys keep it updated with details there's a chance someone can jump in. I'd also try IRC channels for help, #mongodb or #heroku maybe?

dstein64 added a commit to dstein64/vimgolf that referenced this issue Mar 22, 2021
@gayatrisridhar
Copy link

None of the challenges are working? Is this happening with everyone?

@Hettomei
Copy link
Contributor

Hettomei commented Apr 2, 2021

@gayatrisridhar

It is happenning for everyone

It looks like challenge with roughly less than 500 entries is ok

If you can help, more details at #307

It will take time to be fixed : the only idea we have is to move from mongodb to postgresql. But it is an hard work.

@filbranden
Copy link
Collaborator

filbranden commented May 6, 2021

Fixed after migration to Postgres (#298).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants