Найти и исправить ошибку Next.js
сайт statis.kz около 400000 товаров, но 50 заходов в день, сайт периодически падает
надо выявить проблему и устранить ее, возможно проблема в коде
vps -
CPU
12 vCPU Cores
RAM
48 GB RAM
Storage
250 GB NVMe
Вот последний лог ошибок
:/var/www# docker logs nextjs_store
▲ Next.js 15.1.2
- Local: http://7f2b61ab12b7:3000
- Network: http://7f2b61ab12b7:3000
<--- Last few GCs --->
[1:0x724a560f3020] 112172000 ms: Mark-sweep 3985.6 (4133.5) -> 3968.7 (4134.0) MB, 5675.7 / 0.4 ms (average mu = 0.136, current mu = 0.026) allocation failure; scavenge might not succeed
[1:0x724a560f3020] 112177401 ms: Mark-sweep 3985.0 (4134.0) -> 3971.1 (4136.0) MB, 5257.8 / 0.4 ms (average mu = 0.086, current mu = 0.026) allocation failure; scavenge might not succeed
<--- JS stacktrace --->
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
-
10 days25 USD
562 1 0 10 days25 USDHi, I can look at the code, I have experience with testers, Docker, and generally with Next
-
2 days100 USD
178 2 days100 USDGood afternoon.
I have experience, ready to help.
Send the code - we will cooperate.
-
1 day100 USD
168 1 0 1 day100 USDI have experience optimizing Next.js/Node.js applications in production environments. In similar projects:
Identified bottlenecks in performance: memory leaks, long GC pauses.
Configured Docker containers with resource limits (--max-old-space-size for Node.js).
Conducted code audits and third-party libraries (e.g., overly "heavy" SSR, uncleared caches, improperly implemented render cycles).
Used monitoring tools (Node.js Profiler, clinic.js, pm2, top, docker stats) for resource consumption analysis.
…
Implemented caching optimizations, lazy loading, pagination for large databases (>100,000 products).
-
5 days50 USD
162 5 days50 USDHello, I would like to review the code to identify the cause of the error, most likely optimization is missing. We will agree on the time and price.
-
2 days100 USD
902 11 0 2 days100 USDHello
I can help fix the problem
The problem is not with the server but with the code or the site is allocated too little RAM (if anything, I'm not talking about the small amount of RAM on the server but about how much RAM the server will allocate for the site)
Write to me in private messages and I will help you
-
2 days300 USD
258 2 days300 USDHello Ablay,
I’ve reviewed the logs from your Next.js application, and the issue is clear:
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
Your VPS has excellent resources (12 vCPUs, 48GB RAM), so the problem is likely inside the code — not the server.
What I’ll Do:
… Identify the memory leak or heavy operations causing the crash
Profile and optimize data fetching, especially if product pages load massive datasets
Ensure SSR/SSG logic is efficient (getStaticProps, getServerSideProps, or API routes)
Fix any full-page rendering of 400K+ products (pagination, lazy loading if missing)
Improve Docker and Node settings (--max-old-space-size, production flags)
Add performance logging and health monitoring
Deliverables:
Stable Next.js build (no memory crashes)
Improved product listing and rendering logic
Clean, optimized data flow (products, categories, filters)
Suggestions or fixes to avoid future bottlenecks
I've handled similar high-product-volume eCommerce apps and backend-heavy projects in Next.js + PostgreSQL/Mongo stacks and can confidently resolve this.
Please share access to your repo or Docker setup, and I can begin the diagnostics and repair.
Best regards,
Georgios Toutoudakis
-
1 day80 USD
2964 14 0 1 day80 USDGood afternoon, I have experience in development with Next.js and deployment on a server. Most likely, the problem is in the programmatically limited memory allocated for Next.
-
7 days200 USD
95670 1272 1 10 7 days200 USDHello. I have extensive experience with Next.js. Ready to collaborate
Current freelance projects in the category Javascript and Typescript
I am looking for an experienced Full Stack developer to create a SaaS service for online stores.Service idea: The client uploads a link to their product feed (XML or CSV). The service automatically retrieves the products, takes their photos, and creates new advertising images based on ready-made templates: price, discount, logo, promotional tags, etc. There should also be… Javascript and Typescript, Web Programming ∙ 16 hours 27 minutes back ∙ 68 proposals |
Development of a WebGL/Three.js scene with generation and export of 3D (snapshot) from an animated shaderObject Description:The project is a designer table shaped like a realistic, deep whirlpool (a central vortex that smoothly transitions from a wide horizontal tabletop to a thin elegant leg). Task Essence:A WebGL / Creative Coding developer is required to create an interactive 3D… Javascript and Typescript, Web Programming ∙ 1 day 13 hours back ∙ 27 proposals |
Support and development of the cleaning company's website
20 USD
I'm looking for a web developer/webmaster for long-term support and development of a cleaning company's website. Website: https://donely.ca About the project DoneLy Home Services is a cleaning service company in Canada that is actively growing and expanding its geographical… Javascript and Typescript, Web Programming ∙ 3 days 14 hours back ∙ 63 proposals |
Development of a website according to the specifications on FramerYou need to create a website based on the parameters in the technical specification. https://docs.google.com/document/d/1ODO2C9Krb4AaMiJz9wfbNzWlAyA2FwCCHL8r0biajUY/edit?usp=sharing Please provide your actual rate based on this design. HTML & CSS, Javascript and Typescript ∙ 4 days 15 hours back ∙ 27 proposals |
Development of an interactive Palworld map for the websiteWe need to develop an interactive map for Palworld based on the example: https://palworld.gg/map We need not just a static image, but a full-fledged interactive map where users can view locations, toggle object categories on/off, search for specific points, and interact with… HTML & CSS, Javascript and Typescript ∙ 6 days 6 hours back ∙ 36 proposals |