-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Abnormally high Upstash redis reads per second triggered by HTTP health checker of AWS EC2 load balancer. #145
Comments
Another vote for local redis #110 |
@miurla also, please note that it makes the app extremely slow. I have not used morphic a lot, but still it takes forever to get started. In the logs, it appears that loading history takes a LONG time: You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
https://nextjs.org/telemetry
✓ Ready in 1041ms
○ Compiling /search/[id] ...
✓ Compiled /search/[id] in 76.1s
history loaded
history loaded
GET / 200 in 72931ms |
Thanks Yoshiki. AWS is just the hosting environment, and I used docker for the deployment, nothing special. The problem is indeed the "/" health check, which I don't think cache works in this case. Is there any other path that I can use for the health check monitoring without loading all the history? Will check the Upstash region settings. |
Since the search path also loads history, it seems best to create a custom path for health checks. |
Yup, should be easy to fix. |
Describe the bug
I have morphic deployed on both Vercel and locally on AWS. The AWS version was deployed using docker-compose, with latest commits around one week later than the Vercel one.
And I got warning from Upstash that I've exceeded the free tier on the same day of AWS deployment, I added my credit card and found today that morphic has read 31GB of data with 1.7M reads. I shutdown the container and the reads went down to zero instantly.
The patter was highly regular and I suspected the trigger was the health check on the HTTP port, done by AWS EC2 load balancer. I turned down the frequency and the load went down as well.
I guess when everything HTTP health check reads the "/" path, the whole history is loaded and triggered many reads on Upstash.
Apart from the issue, I would highly suggest adding a local Redis option as Upstash doesn't cover global regions such as Singapore and Hong Kong.
Screenshots
The text was updated successfully, but these errors were encountered: