Giter Club home page Giter Club logo

Comments (3)

kartikk221 avatar kartikk221 commented on September 23, 2024 1

You're saying that there is a memory leak in postter.js but hyper-express is not serving anything from postter.js. In fact, I am not even sure why you have hyper-express in postter.js as the job of postter.js just seems to be to send requests to hyper-express. What even is the point of creating a hyper-express server in postter.js without any routes and then listening it on port 6500?

The getter.js in which you have the hyper-express route parsing the responses as json is actually working phenomenally with very good memory usage of just ~80 MB.

The "memory leak" you are talking about in your postter.js is not a memory leak but rather your setInterval firing off a ridiculous amount of fetch requests without any throttle at all. So you aren't seeing a memory leak but a really fast memory exhaustion from all those fetch requests being made to a local server. Keep in mind, 1000 / 5 = 200 aka. your postter.js is sending out ~200 requests per second to hyper-express. This type of request rate is nothing for hyper-express and as you can see from your getter.js, hyper-express has no trouble handling these requests. It's your postter.js which is struggling because fetch is very memory intensive, especially when you're firing off 200 requests / second.

Please review your code again carefully to notice the mistakes.

from hyper-express.

pinqtape avatar pinqtape commented on September 23, 2024

image
image

from hyper-express.

pinqtape avatar pinqtape commented on September 23, 2024

I just wanted to reproduce everything as it was in my production, you are right about hyper-express in postter, the leak is due to node-fetch, but I do not know how to solve it... thank you!

from hyper-express.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.