-
Notifications
You must be signed in to change notification settings - Fork 8.3k
MemoryTracker wrong total: Memory limit (total) exceeded, but no real usage #15932
Copy link
Copy link
Closed
Closed
Copy link
Labels
bugConfirmed user-visible misbehaviour in official releaseConfirmed user-visible misbehaviour in official releasememoryWhen memory usage is higher than expectedWhen memory usage is higher than expected
Description
Simple SELECT query leads to Memory limit (total) exceeded due to wrong reporting by MemoryTracker (no real usage detected in top)
I execute a simple query (select a from b where c = 1) in one thread sequentially via HTTP:
for i in `seq 1 500`; do curl "http://ch:8123/?query=SELECT%20a%20FROM%20%60db%60.b%20WHERE%20c%3D1%20format%20JSON"; done;
It leads to this error in 15 seconds
DB data ~200mb compressed.
It consumes ~4MB per request and accumulates up to the 3.6GB limit. I see a continuous growth in MemoryTracker, which, if you do not stop the requests (or switch to other request), will not be reset.
But there is no real growth in the top.
Result contains 0 rows if it matters
Version 20.9.2.20 stable, in 20.6 and 20.8 it was the same.
Changing config max_server_memory_usage_to_ram_ratio is a dirty fix
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugConfirmed user-visible misbehaviour in official releaseConfirmed user-visible misbehaviour in official releasememoryWhen memory usage is higher than expectedWhen memory usage is higher than expected