MAEASaM / MAEASaM-resource-models

0 stars 0 forks source link

Geometry Operation error #4

Closed RHVDM closed 7 months ago

RHVDM commented 7 months ago

2024-03-01 05:27:48,262 arches.app.views.tile ERROR Saving tile failed [Tile id: ] [Exception message: OperationalError] [Exception trace: Traceback (most recent call last): File "/home/arches/ENV/lib/python3.10/site-packages/django/db/backends/utils.py", line 89, in _execute return self.cursor.execute(sql, params) psycopg2.OperationalError: SSL connection has been closed unexpectedly

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/home/arches/ENV/lib/python3.10/site-packages/arches/app/views/tile.py", line 174, in post tile.after_update_all() File "/home/arches/ENV/lib/python3.10/site-packages/arches/app/models/tile.py", line 592, in after_update_all datatype.after_update_all(tile=self) File "/home/arches/ENV/lib/python3.10/site-packages/arches/app/datatypes/datatypes.py", line 1420, in after_update_all cursor.execute( File "/home/arches/ENV/lib/python3.10/site-packages/django/db/backends/utils.py", line 67, in execute return self._execute_with_wrappers( File "/home/arches/ENV/lib/python3.10/site-packages/django/db/backends/utils.py", line 80, in _execute_with_wrappers return executor(sql, params, many, context) File "/home/arches/ENV/lib/python3.10/site-packages/django/db/backends/utils.py", line 84, in _execute with self.db.wrap_database_errors: File "/home/arches/ENV/lib/python3.10/site-packages/django/db/utils.py", line 91, in exit raise dj_exc_value.with_traceback(traceback) from exc_value File "/home/arches/ENV/lib/python3.10/site-packages/django/db/backends/utils.py", line 89, in _execute return self.cursor.execute(sql, params) django.db.utils.OperationalError: SSL connection has been closed unexpectedly

So this indicates some failure to communicate with the database. And indeed, when I looked in the logs, a security update was applied to the postgresql installation around the time the geometry save stopped. But our postgresql installation doesn't communicate with Arches via SSL. So I looked in the PostgreSQL logs and saw:

error: Not an int attribute (Producer: 'LLVM15.0.7' Reader: 'LLVM 14.0.0')

(not time stamped, but occurring in clumps which led me to believe that each instance was a result of my trying to upload your geojson.). Also, LLVM is a C/C++ compiler. Wah!

And then I found:

https://stackoverflow.com/questions/76192816/

Where a tiny, unregarded comment says:

This seems like it might be a problem with JIT (Just-In-Time compilation, which LLVM is used for). Try disabling JIT in 'postgresql.conf'. JIT is not very useful in PostgreSQL and causes a lot of problems, and in my opinion it should be off by default, but sadly it is on by default.

So I disabled JIT in postgresql.conf. And the geojson upload worked.

Message from David