Обсуждение:

Поиск
Список
Период
Сортировка

От
Satyamnaidu Gokeda
Дата:
Hi Team, 
We have database size of 1.5GB we are facing issue connection getting timeout error..
We have checked locking there are around 1600 long running query in pg_locks .. please find attached snap.
DB load 70% after restart again long running query are running also db load increased.


Thanks,
Satyam Naidu.
Ph : 6281799910
Вложения

Re:

От
Jeff Janes
Дата:


On Tue, Aug 16, 2022, 3:21 PM Satyamnaidu Gokeda <satyamnaidu215@gmail.com> wrote:
Hi Team, 
We have database size of 1.5GB we are facing issue connection getting timeout error..
We have checked locking there are around 1600 long running query in pg_locks .. please find attached snap.
DB load 70% after restart again long running query are running also db load increased.

That looks like just a handful of connections, each holding locks on a very large number of partitions. That is not very much information.  Pg_locks is not the best place to start looking.  With pg_stat_activity you can see the actual query text, how long it has been running, and other details. Once you have the query text, you can do an EXPLAIN to see how it will be executed.

There are lots of kinds of timeouts.  Please show the actual error message.

Cheers,

Jeff