Memory Issues with File Dropzone Component

I've noticed that the RAM usage for both the retool app container and db container increase when uploading files (specifically using the File Dropzone component, though not sure if that matters vs the other file input components). We are using this component to send files to a non-retool API that we host. These files are never more than 8mb in size and they are always uploaded individually.

This memory usage increase makes sense, because my understanding is that the file is passing through the retool backend. However, we are observing that the memory usage does not go back down even after hours or days -- it appears to remain at a higher level. What ends up happening is that eventually the app and/or db start running out of RAM and thus the containers crash. Our only solution currently is to restart the containers every now and then to reset the memory usage.

We are on retool version 3.16.5. Does anyone have experience with this issue?

Hey @fortuni, taking a look at this. As far as can tell we haven't had any other reports of this, but I'll spin up an instance on that version and investigate. Can you share how you are hosted (ie: docker-compose, kubernetes etc?) and the memory + cpu resource allocations you have set up. Thanks!

Hi @joeBumbaca thanks for taking a look!

As an update, I think the app container is fine, but the db container runs out of RAM eventually (i.e. over the course of days/weeks).

We are hosted on Aptible and I referenced the docs here to originally set it up (Remove aptible and render instructions by BenjamynBaker · Pull Request #186 · tryretool/retool-onpremise · GitHub). I know those got deleted but it worked perfectly fine for me.

The app container has 4gb memory and 1 vCPU (cpu does not seem to be an issue). The database container has 10gb disk size, 0.25 vCPU, and 1gb RAM. Disk size and CPU don't seem to be an issue.

Let me know if I can provide more information!

Its seem like my issue, when i upload a CSV file with 19MB size, Retool always return error.
I tried many ways to solve this issue, but it does not have any change.
I checked logs, and i found that many replacing worker running every time.

Hey @fortuni, thanks for that information.

We removed the instructions for Aptible because it's a difficult deployment method to support. That doesn't mean it can't work!

On the infra side, looks like you are allocating about 1/4 of the recommended memory requirements. Are you able to share memory usage logs / graphs for the deployment?

Along with sending logs, for next steps I'd try this (in order):

  1. Update your instance to the latest stable release. v3.33 and check memory utilization there. If you are still running into issues, then =>

  2. Increase the memory allocation on the deployment.

Okay, we can see if the issue persists when we get around to upgrading the retool version

@fortuni feel free to pass along memory usage logs as well in the interim!