arkhn / fhir-river

Live ETL pipeline to standardize Health Data into FHIR.
Apache License 2.0
42 stars 4 forks source link

500 on river/api/filters #718

Closed MiskoG closed 2 years ago

MiskoG commented 2 years ago

Since the last deployment of River interface on sandbox env (today or yesterday) I systematically get these 500 errors on my project : https://sandbox.arkhn.com/river/sources/ckuo369io000a0cp6ijgdpbtj

image

BPierrick commented 2 years ago

I found this in the api logs on sandbox :

[pid: 10|app: 0|req: 72/362] 10.0.0.2 () {66 vars in 1822 bytes} [Wed Nov 17 14:23:37 2021] GET /api/filters/ => generated 145 bytes in 64 msecs (HTTP/2.0 500) 5 headers in 169 bytes (1 switches on core 1)
2021-11-17 14:23:37,210 [   ERROR]          log.py:224 Internal Server Error: /river/api/filters/
Traceback (most recent call last):
  File "/srv/venv/lib/python3.8/site-packages/django/contrib/sessions/backends/base.py", line 233, in _get_session
    return self._session_cache
AttributeError: 'SessionStore' object has no attribute '_session_cache'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/srv/venv/lib/python3.8/site-packages/django/db/backends/base/base.py", line 219, in ensure_connection
    self.connect()
  File "/srv/venv/lib/python3.8/site-packages/django/utils/asyncio.py", line 26, in inner
    return func(*args, **kwargs)
  File "/srv/venv/lib/python3.8/site-packages/django/db/backends/base/base.py", line 200, in connect
    self.connection = self.get_new_connection(conn_params)
  File "/srv/venv/lib/python3.8/site-packages/django/utils/asyncio.py", line 26, in inner
    return func(*args, **kwargs)
  File "/srv/venv/lib/python3.8/site-packages/django/db/backends/postgresql/base.py", line 187, in get_new_connection
    connection = Database.connect(**conn_params)
  File "/srv/venv/lib/python3.8/site-packages/psycopg2/__init__.py", line 127, in connect
    conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
psycopg2.OperationalError: FATAL:  remaining connection slots are reserved for non-replication superuser connections
MiskoG commented 2 years ago

@simonvadee Do you have an idea on this one ?

simonvadee commented 2 years ago

the postgres database was having a "too many clients" issue, I fixed it by restarting postgres, can you confirm and close ?

MiskoG commented 2 years ago

👍 Works great, thanks !