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?

已提問 2 年前檢視次數 310 次
1 個回答
0
已接受的答案

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

已回答 2 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南