502 bad gataway error

Hello,

I’m receiving a 502 Bad Gateway error when I’m sending a request to my django application. The worker is killed right after sending the request with 30% of CPU and 50% of memory usage

2025-05-22T13:12:10.892Z
	/app/.venv/lib/python3.13/site-packages/dj_rest_auth/registration/serializers.py:228: UserWarning: app_settings.USERNAME_REQUIRED is deprecated, use: app_settings.SIGNUP_FIELDS['username']['required'] 
	
2025-05-22T13:12:10.892Z
	required=allauth_account_settings.USERNAME_REQUIRED, 
	
2025-05-22T13:12:10.892Z
	/app/.venv/lib/python3.13/site-packages/dj_rest_auth/registration/serializers.py:230: UserWarning: app_settings.EMAIL_REQUIRED is deprecated, use: app_settings.SIGNUP_FIELDS['email']['required'] 
	
2025-05-22T13:12:10.892Z
	email = serializers.EmailField(required=allauth_account_settings.EMAIL_REQUIRED) 
	
2025-05-22T13:12:10.892Z
	/app/.venv/lib/python3.13/site-packages/dj_rest_auth/registration/serializers.py:288: UserWarning: app_settings.EMAIL_REQUIRED is deprecated, use: app_settings.SIGNUP_FIELDS['email']['required']

	
2025-05-22T13:12:10.892Z
	email = serializers.EmailField(required=allauth_account_settings.EMAIL_REQUIRED) 
	
2025-05-22T13:12:19.005Z
	[2025-05-22 13:12:19 +0000] [1] [ERROR] Worker (pid:38) was sent SIGKILL! Perhaps out of memory?
 
	
2025-05-22T13:12:19.007Z
	[2025-05-22 13:12:19 +0000] [47] [INFO] Booting worker with pid: 47

endpoint: /api/v1/core/accounts/?country=IT&range_employees=10-49

The query takes 78ms.

Everything is running on a AWS UpRunner instance that has 1 CPU with 1 core 2GB of RAM.
Currently using:

  • Django 5.2.1
  • Django REST framework 3.15.2
  • Python 3.13
  • Gunicorn 23
  • Gevent 24.11.1