Skip to content

video deliverables: remove transaction upon peertube sync

Fabio M requested to merge feat/reduce-transactions into main

The number of open connections to the DB has increased a lot (reaching 884 per hour), causing not only a bigger response time from the DB, but also a slower response of the backend on every request.

My current analysis shows that huge transactions hold connections until completion, so we should aim for much short and reduced transactions.

Given the CPU utilisation of both backend, DB and peertube (all below 5%), we can afford some added logic on them to save some DB bandwidth. This MR removes the @Transactional() decorator on peertubeSync, which is a function that may call Peertube several times and hold a DB connection for more than 1s (which is terrible for the perspective of DB connections).

Merge request reports