Giter VIP home page Giter VIP logo

Comments (8)

crisbal avatar crisbal commented on May 22, 2024

I am interested in this too. I also notice a small but constant memory usage increase.

from node-telegram-bot-api.

yagop avatar yagop commented on May 22, 2024

The leak might be on https://github.com/yagop/node-telegram-bot-api/blob/master/src/telegramPolling.js#L50 there is an infinite loop which I should fix ...

from node-telegram-bot-api.

crisbal avatar crisbal commented on May 22, 2024

Could this be fixed by replacing the timeout with a set interval?

On Sat, Dec 26, 2015, 19:07 Yago [email protected] wrote:

The leak might be on
https://github.com/yagop/node-telegram-bot-api/blob/master/src/telegramPolling.js#L50
there is an infinite loop which I should fix ...


Reply to this email directly or view it on GitHub
#52 (comment)
.

from node-telegram-bot-api.

yagop avatar yagop commented on May 22, 2024

Could be if its called outside. The matter of using an interval is that the function could be called before the previously one haven't finished. That behavior must be avoided.

from node-telegram-bot-api.

yagop avatar yagop commented on May 22, 2024

I tried limiting node with --max_old_space_size but it doesn't seem to work (same behavior). Both bots are just rarely used, and anyhow it seems like the leak starts before my own code is even reached.

Seems the option is --max-old-space-size.

Which NodeJS version are you using? Seems v4 have improved in memory usage. I changed the _polling method a bit, seems the memory still increasing in node v0.12.4 but slowly and hope it converge to smaller number. With v4.2.4 increases till 50MB and stops.

from node-telegram-bot-api.

bjesus avatar bjesus commented on May 22, 2024

I tried both --max-old-space-size and --max_old_space_size before, none seemed to work.

Anyhow, I just upgraded Node.JS's version to 5.4 (was running 0.10.25...) and upgraded node-telegram-bot-api, and the problem seem to be gone. it's been 24 hours I can't recognize no signal for the leak.

Thank you!

from node-telegram-bot-api.

GochoMugo avatar GochoMugo commented on May 22, 2024

With the recent changes, I believe this issue might be fixed. We are also running bots using this library, and we do not have any memleak problems.

If this issue still persists for you (with the new versions, of course), please provide us with more information, such as, the average number of users your bot is serving, RAM size in your server, etc.

Otherwise, am marking this issue as stale to be closed at a later date, should no activity be seen in this thread!

from node-telegram-bot-api.

GochoMugo avatar GochoMugo commented on May 22, 2024

Issue went too stale...

from node-telegram-bot-api.

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.