1

I have situation which is almost identical to the one described here: Play framework resource starvation after a few days

My application is simple, Play 2.6 + PostgreSQL + Slick 3. Also, DB retrieval operations are Slick only and simple. Usage scenario is that data comes in through one endpoint, gets stored into DB (there are some actors storing some data in async fashion which can fail with default strategy) and is served through rest endpoints.

So far so good.

After few days, every endpoint that has anything to do with database stops responding. Application is server on t3-medium on a single instance connected to RDS instance. Connection count to RDS is always the same and stable, mostly idling.

What I have also noticed is that database actually gets called and query gets executed, but request never ends or gets any data.

Simplest endpoint (POST) is for posting feedback - basically one liner:

feedbackService.storeFeedback(feedback.deviceId, feedback.message).map(_ => Success)

This Success thing is wrapper around Ok("something") so no magic there. Feedback Service stores one record in DB in a Slick preferred way, nothing crazy there as well.

Once feedback post is called, I notice in psql client that INSERT query has been executed and data really ends up in database, but HTTP request never ends and no success data gets returned. In parallel, calling non DB related endpoints which do return some values like status endpoint goes through without problems.

Production logs don't show anything and restarting helps for a day or two. I suppose some kind of resource starvation is happening, but which and where is currently beyond me.

Bruno Batarelo
  • 315
  • 2
  • 11

0 Answers0