I am trying to deploy a Django project with Zappa and a PostgreSQL database on Amazon AWS RDS but I am running into this error:
$ zappa manage dev create_db
[START] RequestId: ac91cbb6-9026-44d5-9136-3e4db8c0878c Version: $LATEST
[DEBUG] 2020-09-22T11:16:57.834Z ac91cbb6-9026-44d5-9136-3e4db8c0878c Zappa Event: {'manage': 'create_db'}
[ERROR] RuntimeError: populate() isn't reentrant
Traceback (most recent call last):
File "/var/task/handler.py", line 609, in lambda_handler
return LambdaHandler.lambda_handler(event, context)
File "/var/task/handler.py", line 243, in lambda_handler
return handler.handler(event, context)
File "/var/task/handler.py", line 404, in handler
app_function = get_django_wsgi(self.settings.DJANGO_SETTINGS)
File "/var/task/zappa/ext/django_zappa.py", line 20, in get_django_wsgi
return get_wsgi_application()
File "/var/task/django/core/wsgi.py", line 12, in get_wsgi_application
django.setup(set_prefix=False)
File "/var/task/django/__init__.py", line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File "/var/task/django/apps/registry.py", line 83, in populate
raise RuntimeError("populate() isn't reentrant")[END] RequestId: ac91cbb6-9026-44d5-9136-3e4db8c0878c
[REPORT] RequestId: ac91cbb6-9026-44d5-9136-3e4db8c0878c
Duration: 2.28 ms
Billed Duration: 100 ms
Memory Size: 512 MB
Max Memory Used: 101 MB
Error: Unhandled error occurred while invoking command.
Pretty meaningless error. I google'd this and tried some of the solutions in other tickets but could not resolve this. I tried psycopg2 and psycopg2-binary but both no luck. Did anyone ever solve this? Because all the articles/issues covering this are old and outdated.
I am trying to deploy a Django project with Zappa and a PostgreSQL database on Amazon AWS RDS but I am running into this error:
Pretty meaningless error. I google'd this and tried some of the solutions in other tickets but could not resolve this. I tried
psycopg2
andpsycopg2-binary
but both no luck. Did anyone ever solve this? Because all the articles/issues covering this are old and outdated.Zappa settings:
The DB command:
Pip freeze: