WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit b72152f

Browse files
authored
chore: slow down inserts (#4399)
1 parent c6ed44c commit b72152f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

go/pkg/clickhouse/client.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ func New(config Config) (*clickhouse, error) {
109109
Drop: true,
110110
BatchSize: 50_000,
111111
BufferSize: 200_000,
112-
FlushInterval: 5 * time.Second,
112+
FlushInterval: 60 * time.Second,
113113
Consumers: 2,
114114
Flush: func(ctx context.Context, rows []schema.ApiRequest) {
115115
table := "default.api_requests_raw_v2"
@@ -129,7 +129,7 @@ func New(config Config) (*clickhouse, error) {
129129
Drop: true,
130130
BatchSize: 50_000,
131131
BufferSize: 200_000,
132-
FlushInterval: 5 * time.Second,
132+
FlushInterval: 60 * time.Second,
133133
Consumers: 2,
134134
Flush: func(ctx context.Context, rows []schema.KeyVerification) {
135135
table := "default.key_verifications_raw_v2"
@@ -150,7 +150,7 @@ func New(config Config) (*clickhouse, error) {
150150
Drop: true,
151151
BatchSize: 50_000,
152152
BufferSize: 200_000,
153-
FlushInterval: 5 * time.Second,
153+
FlushInterval: 60 * time.Second,
154154
Consumers: 2,
155155
Flush: func(ctx context.Context, rows []schema.Ratelimit) {
156156
table := "default.ratelimits_raw_v2"

0 commit comments

Comments
 (0)