ihippik / wal-listener

PostgreSQL WAL listener
Apache License 2.0
296 stars 44 forks source link

Memory allocation #22

Closed marcinprositno closed 5 months ago

marcinprositno commented 7 months ago

When there is a big chunk of data being changed in PG this library before starts sending the data it allocates lots of memory.

  1. Update table or insert data into a table, at lease 3M rows in one transaction.
  2. Monitor how memory is growing in your application when this package is listening to WAL changes.

I noticed it when I setup and app with this package which was hosted as a pod in k8s. k8s was killing the pod over and over because it was reaching memory limit very fast.

ihippik commented 7 months ago

Thanks for letting me know! I will check this one.

ihippik commented 6 months ago

@marcinprositno hey, try this release: https://github.com/ihippik/wal-listener/releases/tag/v2.5.2 reduce memory allocation almost 2 times