akvo-rsr
akvo-rsr copied to clipboard
Bug: Contributing project creation with large results framework time out frontend
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 .


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