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년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠