Comments (8)
I am interested in this too. I also notice a small but constant memory usage increase.
from node-telegram-bot-api.
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.
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.
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.
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.
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.
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.
Issue went too stale...
from node-telegram-bot-api.
Related Issues (20)
- how to create sticker with pack, i'm new with this library so i got many error while trying
- sendMediaGroup - InputMediaDocument HOT 2
- question how to save photos by reply HOT 1
- multiple upload file HOT 1
- bot.on('message', ...) works unexpected
- Occasionally not receiving message update
- Listening for a reply to an image with the '/isimage' command, replying with a message saying 'this is an image' HOT 1
- Deleting old message IDs in Telegram
- function createInvoiceLink not exist HOT 1
- Add to sendInvoice start_parameter HOT 2
- Pre-Checkout Timeout Error while making a Payment
- The editMessageMedia method is working a bit wrong
- The 'Update' object sometimes does not have an attribute 'reply_to_message' in private messages
- Webhook setup via URL returns blank
- Business Mode HOT 5
- please help me i got this error HOT 1
- Bot replys to user no problem, but when i want it to send announchment to channel or group. nothing happens
- I have problem. I have more than 1,500 users, and the bot checks the site if products are available and sends for All the users if they are available. I set that it checks the site every 50 seconds so that the users can get the notification before the stock runs out, but I faced a problem, which is that it is very late. In the transmitter
- Bot occasionally doesn't receive update
- I always get 401 unauthorized error when use test bot
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-telegram-bot-api.