Play Framework Database Related endpoints hang after some up time

I have a 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.
The 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 a few days, every endpoint that has anything to do with database stops responding. The application is running 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 a 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 the 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.

Original questions was linking to https://stackoverflow.com/questions/53189677/play-framework-database-related-endpoints-hang-after-some-up-time

Hey @bbatarelo, I’ve edited your question to brings the text from stackoverflow, so it will be easier to users here.

What that means? It times out? Or there is an error logged? And if so, which error? How is your connection pool configured?

Best.