Skip to content

Subprojects page is throwing 502s #6455

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

Closed
siddacious opened this issue Dec 13, 2019 · 11 comments · Fixed by #6869
Closed

Subprojects page is throwing 502s #6455

siddacious opened this issue Dec 13, 2019 · 11 comments · Fixed by #6869
Labels
Accepted Accepted issue on our roadmap Bug A bug

Comments

@siddacious
Copy link

Details

This is the same issue as #6027, with the same project

Expected Result

Going to https://readthedocs.org/dashboard/circuitpython/subprojects/
should load within a second or two

Actual Result

Recently I will often get a 502 when loading the subprojects admin page. When I don't, I almost always get a 502 upon submitting the form, though the addition appears to be successful

@stsewd
Copy link
Member

stsewd commented Dec 16, 2019

Just loading the page https://readthedocs.org/projects/circuitpython/ I can see it takes a long time to load... I think this is because we are calling the resolver for each subproject (to get the docs URL). We need to optimize this somehow.

@stsewd stsewd added the Bug A bug label Dec 16, 2019
@tannewt
Copy link

tannewt commented Dec 18, 2019

@stsewd Let us know if there is a sponsor tier we can join to help get this fixed. I'm personally a gold member but we aren't as a company.

@humitos
Copy link
Member

humitos commented Dec 18, 2019

Our resolve method is doing 7 db queries to resolve each URL. Some of them are duplicated when resolving one URL and most of them are duplicated when resolving multiple URLs for subprojects of the same project. This method is probably a good place to take a look and try to optimize.

@siddacious
Copy link
Author

@humitos or whomever else; please let us know what we can do to help get this addressed. It's impacting part of our process for documenting our libraries

@humitos
Copy link
Member

humitos commented Jan 7, 2020

Hi @siddacious! I took a look at the code and it really needs a refactor. Although, it does not look as a small refactor or easy to attack. I got lost very quickly while trying to make some performance improvements. Unfortunately, I don't have the time or energy currently to focus 100% on this problem but I will keep thinking on a different approach for a solution (at least an acceptable hack) for now.

If someone else has some ideas about how we can optimize this code to avoid this problems, we would be happy to help.

@humitos humitos added the Sprintable Small enough to sprint on label Jan 25, 2020
@agjohnson agjohnson added Accepted Accepted issue on our roadmap and removed Sprintable Small enough to sprint on labels Mar 4, 2020
@agjohnson
Copy link
Contributor

@siddacious we're going to get this on our short term roadmap, it's a pretty clear bug of our subproject handling. I think we understand what needs to change, but if there is a short term fix that can fix the bug for your projects, we'll see about temporarily putting that in place for your projects.

@siddacious
Copy link
Author

@agjohnson Awesome, great to hear. Thank you!

@siddacious
Copy link
Author

Thank you @stsewd ! Looks like you folks have a roughly weekly release cadence? Much appreciated, great work :)

@stsewd
Copy link
Member

stsewd commented Apr 7, 2020

@siddacious sorry for the delay resolving this issue, we are doing a release today, hopefully in a couple of hours we can check if the merged PRs were enough. #6867 is still missing, but I hope that whit what already have is enough to stop the 500.

@stsewd
Copy link
Member

stsewd commented Apr 7, 2020

@siddacious it should be out now, can you please confirm it that fixed the problem?

stsewd added a commit that referenced this issue Apr 7, 2020
This is related to #6455

We list all subprojects on the detail view too.
It doesn't throw a 5xx, but it's slow https://readthedocs.org/projects/circuitpython/
@siddacious
Copy link
Author

@stsewd Yes, it's fixed! Thank you :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accepted Accepted issue on our roadmap Bug A bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants