SQL query freezes when connecting Aurora Postgresql cluster through RDS proxy endpoint

0

Hi,

We have tried to add RDS proxy to our AWS solution under development. Target database is Aurora cluster with Postgresql, containing geoinformation data(write + read instances). Our lambdas works fine when working directly with the Aurora cluster(until we want to speed things up and run more at the time and connections run out. That's why proxy is one thing we are trying to use). With proxy everything seems to be working fine until in some point it seems to freeze in some lambda until timeout occurs. No error message are given(or at least I can't find one). I have established VPN connection to the database and studied one of the freezed lambda code. By doing this I found out that e.g. running "db.run('SELECT id FROM geodata WHERE ST_Intersects(geom, ST_GeometryFromText(:wkt,3067))', **parameters)" in loop it freezes the prosessing in some point. maybe after 1-100 trys. The proxy seems to be happy if the query is done e.g. using id as selection criteria. If I use this same code directly with the Aurora cluster endpoint no problems occurs. Connection is created with pg8000.native.Connection.

  • Some further studies are showing that I cannot use parameters in my SQL query(that :wkt given in parameters) and this could be the reason why the solution was failing with proxy?

feita há 2 anos310 visualizações
1 Resposta
0
Resposta aceita

Using psycopg2 was the solution. So some code refactoring was needed.

respondido há 2 anos

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas