Managing a registration with lot of fields return 502 Bad Gateway


I have a registration form within a conference in my indico server (with nearly 100 fields - not sure if this is related). The normal users can submit registration correctly without issues.

When we try to manage the registrants of this form (i.e. accessing /event/13/manage/registration/10/registrations/ ), we get 502 Bad Gateway from nginx.

Upon closer inspection, the nginx error log (/opt/indico/log/nginx/error.log) gives this:

2021/02/23 11:35:04 [error] 27029#0: *5 upstream prematurely closed connection while reading response header from upstream, client: IPADDRESS, server: DOMAIN, request: "GET /event/13/manage/registration/10/registrations/ HTTP/1.1", upstream: "uwsgi://unix:/opt/indico/web/uwsgi.sock:", host: "DOMAIN", referrer: "https://DOMAIN/event/13/manage/registration/10/"

Indico log has logged the request correctly like this:

indico.rh                 GET /event/13/manage/registration/10/registrations/

But there is no further error reported within indico log.

Is there a way to resolve this issue? or at least to help me debug this further?

Thank you.

Does it happen immediately or after a long time (ie possibly a timeout)? How many registrants do you have? Could it be that you run out of memory and uwsgi gets killed by the oom-killer (that would show up in dmesg).

Yes, this happens after waiting a while.
I have 90 registrants currently in this form.

I tried dmesg, and it seems oom-killer was invoked as you suspect.
I used very low RAM in this server to limit cost, but I am able to increase RAM from time to time if required. So I will try increase the RAM and see if this resolve the issue.

90 registrants are almost nothing, so it certainly should not cause such excessive memory usage. 100 fields are a lot, but still…

FWIW, Indico is a large application so it does require quite a bit of memory, so if you were very conservative there it may indeed cause problems. Tip: If you reduce the number of uWSGI processes that will also reduce the baseline memory usage - and depending on how actively your instance is used, very few processes may be enough.