akvo-rsr icon indicating copy to clipboard operation
akvo-rsr copied to clipboard

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

Open MichaelAkvo opened this issue 3 years ago • 0 comments

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 avatar Sep 15 '22 07:09 MichaelAkvo