huor
发布于

Could not read() message from seqserver

现象:
User receives the following error when inserting into a table that use a sequence as a default value for a field.
Error: Could not read() message from seqserver.(error:104). Closing connection. (seqserver.c:284)

原因:
The segment request to sequence server on master times out waiting for a sequence response. This will happen usually when many sequence requests are made.

方案:
Update the sequence's "cache_value". A value of "1" in "cache_value" means it caches one sequence for each request to the sequence server. By increasing "cache_value" you're limiting the number of sequence requests sent to master.
Check sequence cache_value (seq_test)

select * from xref.seq_test;
sequence_name | last_value | increment_by | max_value | min_value | cache_value | log_cnt | is_cycled | is_called
-----------------------+---------------------+--------------+---------------------+---------------------+-------------+---------+-----------+-----------
seq_test | 2100000004040261379 | 1 | 2199999999999999999 | 2100000000000000001 | 1 | 15 | f | t
Change the sequence's cache_value (to 100)

ALTER SEQUENCE xref.seq_test CACHE 100

参考:
https://community.pivotal.io/s/article/could-not-read-message-from-seqserver?language=en_US

评论
    test