Something went wrong - Loading chunk 33 failed after 5 retries. (33.fa233927.js)

Hi so I'm moving the retool self-hosted app (ECS+Fargate) from an old AWS account to a new AWS account.

Here's what's been done so far.

  1. Deployed the ECS+Fargate template in the new account.
  2. Created a new PostgreSQL database from the snapshot of the old account's DB.
  3. Modified the template with the DB credentials and the encryption,jwt keys used in the old account, and deployed the template again. It seems to work as I can see many active connections on the DB.

How the issue looks:

  1. I visit http://alb-dns-url:3000
  2. It spins for a few minutes and shows the error: Something went wrong. Loading chunk 33 failed after 5 retries. (33.fa233927.js)
  3. The console log shows: Failed to load resource: net::ERR_CONNECTION_RESET

Troubleshot so far:

  1. Checked the CloudWatch logs, there were no errors observed.
  2. Checked CloudWatch enhanced monitoring, nothing unusual was found.
  3. Added these variables for further diagnosing but still no errors were reported.
    Environment:
      - Name: DEBUG
        Value: "1"
      - Name: LOG_LEVEL
        Value: "debug"
  1. The heap memory showed
        "memoryStatsForProcess": {
        "heapTotalMb": 247.554048,
        "heapUsedMb": 228.92252,
        "percentageHeapUsed": 92.47,
        "rssMb": 390.438912

So added this to the template and deployed it.

      - Name: NODE_OPTIONS
        Value: "--max-old-space-size=2048"

However, it doesn't seem to have been picked and logs still show the unchanged heap total memory.

Can you please point me in the right direction to help me fix this?

P.S. the image used is - tryretool/backend:3.33.37-stable

Answering my own question to fix this issue (but another one has come up)

I checked the network tab and observed that a file - 50628.df6a9f44.js - has failed to load with a 404 not found error. The origin told me these are files hosted on selfhost.retool-edge.com and when I browsed to that link, it was indeed a 404.

So to fix this, I used a newer image than 3.33.x and decided to go for 3.52.x and then my login page and homepage loaded up successfully.

=========================================================

Now the next issue - When I go into a configuration, I see a blank page with a spinning circle in the middle. I reckon the URL is - http://alb-url:3000/api/environments

and it stops after 9.3 minutes with this error: net::ERR_CONNECTION_RESET 200 (OK)

Any suggestions on fixing this at all?

Answering my own question - My template was missing a lot of important things such as:

- Name: DOMAINS
  Value: "retool.mydomain.com"
- Name: BASE_DOMAIN
  Value: "retool.mydomain.com"
- Name: POSTGRES_SSL_REJECT_UNAUTHORIZED
  Value: "false"

Also commented out:
  # Remove below when serving Retool over https
  #- Name: COOKIE_INSECURE
  #  Value: "true"

Also made sure that my DB user has full owner rights to the entire database.

Then, I performed the incremental updates per this link: Self-hosted Retool Stable releases | Retool Docs

All this helped fixing one unexpected issue at a time but eventually reached a point where all was remediated and there were no longer any console errors or timeouts.

1 Like