#Constantly growing RAM usage

15 messages · Page 1 of 1 (latest)

quaint parcel
#

I have the app that works as an autoresponder. It checks the database every minute to compare if messages should be sent to users, depending on the time passed from their signup date.

Number of autoresponder messages and number of users is constant from the last 7 days, but the usage of RAM is constantly growing.
The down peak occurred when I restarted the app. The restart freed the RAM, but after that point the app again is using more and more RAM.

Any ideas how can I flatten the RAM usage?

nocturne heathBOT
#

Project ID: 7b20ef7d-243f-4f1c-a7f8-33284b9b8efd

solid plazaBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> ✅ Mark Solution

quaint parcel
#

Project ID: 7b20ef7d-243f-4f1c-a7f8-33284b9b8efd

hazy hazel
#

fix the memory leak and you fix the growing ram usage 🙂

regal python
#

Your app may have a memory leak. Here's how to flatten the RAM usage:

  1. Profiling: Use memory profiling tools specific to your language or framework to identify areas of the code that continually allocate memory without releasing it.
  2. Database Connections: Ensure that database connections are closed properly after their use.
  3. Caching: If you're using caching, ensure items are evicted when no longer needed.
  4. Data Structures: Ensure large data structures or objects are de-referenced after use, allowing garbage collection to reclaim the memory.
  5. Garbage Collection: If your language supports manual garbage collection, try triggering it periodically.
hazy hazel
#

if that's an AI answer, it's a good one

#

if it's not, then it's also a good answer

regal python
#

Yes, it is the GPT-4 wisdom 😀

hazy hazel
#

well I don't mind if it's an AI answer as long as it's a good answer!

#

I'd only have a problem if it was making stuff up or getting stuff wrong

solid plazaBOT
regal python
#

When helping others, I often use AI to reduce typing. However, I always proofread and only approve answers that match my intent.

regal python