| From: | Andres Freund <andres(at)anarazel(dot)de> | 
|---|---|
| To: | Ron Wilson <ronw(at)consultzen(dot)com> | 
| Cc: | pgsql-bugs(at)lists(dot)postgresql(dot)org | 
| Subject: | Re: Postgres connection growing memory usage over time! This right after the connections in the pool are closed and opened again. | 
| Date: | 2023-01-10 20:47:11 | 
| Message-ID: | 20230110204711.xntfwpvatv4el6yr@awork3.anarazel.de | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-bugs | 
Hi,
On 2023-01-09 16:50:03 -0600, Ron Wilson wrote:
> The JSON query above was isolated to a single connection to trace the issue
> better.
> You can see in the image below that there is one connection that is growing
> memory usage over time and the rest are not.
> [image: Screen Shot 2023-01-09 at 4.22.48 PM.png]
> This image shows the memory growing on that single connection that the JSON
> is processed and the other connections that the memory used is stable and
> not growing.  This is just before the connections are closed and opened
> again in the pool.
> [image: Screen Shot 2023-01-09 at 4.25.00 PM.png]
The easiest way (for us) to debug this further would be if you could provide
us with a memory context dump. Unfortunately in PG 13 the
pg_backend_memory_contexts view does not yet exist. So you'd have to gdb into
the backend, and execute
  p MemoryContextStats(TopMemoryContext)
which will dump information to the server's stderr.
Greetings,
Andres Freund
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2023-01-10 22:21:27 | Re: [OT] Microsoft: Kubernetes clusters hacked in malware campaign via PostgreSQL | 
| Previous Message | Anbazhagan M | 2023-01-10 20:35:05 | Re: BUG #17740: Connecting postgresql 13 with different psql versions |