Skip to content
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

Investigate VM crashes when loading page with lots of image #105

Closed
hunghvu opened this issue Dec 27, 2023 · 3 comments
Closed

Investigate VM crashes when loading page with lots of image #105

hunghvu opened this issue Dec 27, 2023 · 3 comments
Labels
bug Something isn't working urgent Happen in production, need to patch ASAP web Related to the web service
Milestone

Comments

@hunghvu
Copy link
Owner

hunghvu commented Dec 27, 2023

When loading pages with lots of images, CPU and memory spike. Mainly the memory spike causes Out of memory errors and crashes the virtual ethernet interface.

Is it related to the change of increasing revalidation time from 3600s to 7200s?

@hunghvu hunghvu added bug Something isn't working web Related to the web service labels Dec 27, 2023
@hunghvu hunghvu added this to the 1.1 milestone Dec 27, 2023
@hunghvu
Copy link
Owner Author

hunghvu commented Dec 28, 2023

Seems like it is not related to caching, the only other change that affects VM resources is AVIF support in #78.

The images uploaded are natively WEBP, so there has never been any image conversion before this change.

We will disable AVIF for now and see how it goes.

@hunghvu
Copy link
Owner Author

hunghvu commented Dec 28, 2023

Note, practically said, when the image is cached (via Next cache or Cloudflare). Resource consumption is no longer an issue. However, on the first load or cache revalidation, there is always a chance the machine crashes due to said issue.

@hunghvu
Copy link
Owner Author

hunghvu commented Dec 28, 2023

Indeed the issue originates from AVIF conversion process. Let's keep it disabled. This issue is resolved.

@hunghvu hunghvu closed this as completed Dec 28, 2023
hunghvu added a commit that referenced this issue Dec 30, 2023
* chore: bump packages

* chore: mark development tasks as no-cache and non-persistent

* chore: bump packages

* feat: add self-host container for mongodb, relates to #93

* feat: expose containers to only localhost (#94)

* feat: optimize indexes to improve performance, relates to #93

* feat: closes #78, enable AVIF image support

* chore: change some parameters to improve experience in development environement

* fix: closes #88, prevent long string overflows

* feat: use animated SVG background, related to #92

* feat: closes #92, overhaul article page UI to improve accessibility and make theme suitable with animated background

* fix: closes #84, increase line height

* fix: closes #89, make letters start at the same place in ordered list, and align ol with ul

* feat: closes #91, overhaul blog page UI and make it SSR

* chore: bump packages

* chore: bump Geist font to v1.2.0, and rename files

* fix: closes #101, now code snippet uses GeistMono font

* feat: load SVG background via next/image to utilize optimization (preload LCP), related to #99

* feat: enforce cache-control on Next.js, relates to #98

* feat: minimize highlight.js import, and change CSS import location, related to #99

* feat: disable external page prefetch, related to #99

* fix: bundle public folder in production

* fix: closes #102, CSS layer order issue

* feat: make divider appear on lg screen and make it dimmer

* feat: adjust navbar color and border to further emphasize articles

* feat: multiple adjusment to text and border, divider color to increase separation and readability

* fix: closes #103, make toast message bottom-center, and remove white border

* feat: adjust font size to improve readability

* feat: remove primeicons to reduce bundle size (blocking and unused CSS), related to #99

* chore: bump packages

* fix: disable AVIF support in an attempt to resolve #105

* fix: remove redundant scrollbar in main page

* feat: use native browser scroll to reduce bundled JS size, related to #99

* feat: massively remove unused CSS bytes by reconfiguring the interaction between PrimeReact and Tailwind, related to #99
@hunghvu hunghvu added the urgent Happen in production, need to patch ASAP label Mar 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working urgent Happen in production, need to patch ASAP web Related to the web service
Projects
None yet
Development

No branches or pull requests

1 participant