Managing very large tables

Which container? Tryton’s one?

As Cédric suggests it’d be good to ensure the problem is at PostgreSQL side.

Some recommendations & ideas:

In order to see the activity that is going on in PostgreSQL server I’d recommend pg_activity.

We also always enable log_min_duration_statement in all production servers so that all queries that take longer than a certain threshold will be logged. See: PostgreSQL: Documentation: 17: 19.8. Error Reporting and Logging, then you can grep + count the number of queries above that threshold to keep an eye to understand if the situation is improving.

Maybe you’re reaching a limit on the number of connections on uwsgi or proxy you’re using? That may explain the freeze?

Depending on the Tryton version you’re using it’d recommend moving to v6. There you’ll find trytond-stat for better understanding what’s going on. Also SAO has several improvements that hopefully will minimize some performance issues present in previous versions (at least until 5.4).

In larger databases, counters can also be a problem, see Counters & performance.

1 Like