Transaction Page and Statement Page Promise Timeout

Hi,

After running locally installed v21.2, I find that transaction page and statement page of Admin UI are not working anymore with promise timeout of 60000ms. At the begining, both pages were working by showing the statistic of transactions and statements. How can I handle this? Which global variable controlling this 60000ms timeout?

Best regards.

Hi Lazuardi,

Please could you elaborate on the issue that you are facing? When you say “At the beginning, both pages were working”, do you mean on a different cockroachdb version? Do you consistently see a timeout for the two pages?

It seems like this timeout could be due to too much stats data which causes the page to timeout on loading. We’re currently working on pagination for this call, but in the meantime, please could you try to reset the stats with select crdb_internal.reset_sql_stats(); and also decrease the amount of data being stored by changing the value of sql.stats.persisted_rows.max (which is 1M by default) to see if that resolves the issue?

Hi Rima,

What is your suggested sql.stats.persisted_rows.max value? I think I will try to lower it first before doing select crdb_internal.reset_sql_stats().

Best regards.

Hi,

We don’t have a recommendation on what value to reduce it to but you could try maybe 750K to start with and then reduce further if it doesn’t work. One thing I want to call out though is that reducing the row count will not immediately have any impact as the DB needs to wait for a clean up job to run which will then delete the old persisted rows. Unfortunately, there is no easy way to launch this clean up job to run immediately. The closest thing we have right now is the sql.stats.cleanup.recurrence cluster setting which is a cronexpr that dictates how often the cleanup job is executed. You could try manipulating that to force the cleanup job to run sooner.

Hi Rima,

When I put 1 for sql.stats.persisted_rows.max value, I find following row number of transaction statistic. Is it normal? What is the relation of sql.stats.persisted_rows.max value and transaction statistics row number?

root@:26257/defaultdb> SELECT COUNT(*) FROM system.transaction_statistics;
count

1050
(1 row)

Time: 48ms total (execution 48ms / network 0ms)

Best regards.

Hi,

The expected row count for system.transaction_statistics would be 1 if you set 1 for the sql.stats.persisted_rows.max value to 1. But I believe it needs the reset job (controlled by the sql.stats.cleanup.recurrence setting) to complete before it truncates the table. Did you also modify that to ensure the clean up runs as expected?

Hi Rima,

I have done select crdb_internal.reset_sql_stats() just after I put 1 for sql.stats.persisted_rows.max value. Today, I change the value to be 10 and yes, after some time the rows are changing form around 2000 to 10. So I think it is bug on putting 1 for that value.

Best regards.

1 Like