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

Bug: Contributing project creation with large results framework time out frontend #5112

Open
MichaelAkvo opened this issue Sep 15, 2022 · 0 comments
Assignees
Milestone

Comments

@MichaelAkvo
Copy link
Contributor

MichaelAkvo commented Sep 15, 2022

What were you doing?

In the "Orange Knowledge Program" the UI times out while creating a contributing project using https://rsr3.akvotest.org/my-rsr/projects/new/settings?parent=7350&program=7350 .

What should've happened?

Creating a contributing project should be quick and not time out.

My environment

No response

Additional context

It seems like the problem is the time it takes to process a request. gunicorn kills workers that take more than 30s to respond / are silent for >=30s. A 'quick fix' would be to increase the timeout to a minute.

The slow endpoint is /rest/v1/program/:id/add-project at https://github.com/akvo/akvo-rsr/blob/master/akvo/rest/views/project.py#L426 .

profile

profile calls

Indicators and period are all saved individually. A bulk_create would probably speed things up significantly.

MichaelAkvo added a commit that referenced this issue Sep 15, 2022
Some requests timeout because the backend takes too long to respond.
The frontend then retries them sometimes which can lead to creation of multiple objects
 as is the case when creating a contributing project in a program.
MichaelAkvo added a commit that referenced this issue Sep 15, 2022
It's doing some weird stuff by timing out requests after exactly 30 seconds.
The workers don't time out, just the request.

 #5112 Contributing project creation with large results framework time out
@MichaelAkvo MichaelAkvo added this to RSR Dec 7, 2022
@MichaelAkvo MichaelAkvo moved this to Preprocess in RSR Dec 7, 2022
@MichaelAkvo MichaelAkvo added Requires Reproduction Issue might not be valid yet and has to be confirmed Priority: Medium labels Feb 20, 2023
@MichaelAkvo MichaelAkvo added this to the Stable milestone Feb 20, 2023
@MichaelAkvo MichaelAkvo moved this from Preprocess to Todo in RSR Feb 20, 2023
@gdeflaux gdeflaux modified the milestone: Stable Feb 23, 2023
zuhdil added a commit that referenced this issue Jul 10, 2023
[#5112] Optimize add_project_to_program API endpoint
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Todo
Development

No branches or pull requests

3 participants