GithubHelp home page GithubHelp logo

Comments (11)

EverythingSuckz avatar EverythingSuckz commented on June 2, 2024 3

@EverythingSuckz i Still Couldn't Figure out what's causing the intense ram usage tho with 10 bots each with work load of 15 (150 in total) at maximux load the ram usage goes up like there is no tomorrow its not an issue with my modification as i only changed the part of url to get chatid with messageid

no other variables or functions has been written as mod

without even a single error the ram usage spike to 1.2 or more if i allow it to

Seems like I'll have to profile the memory usage and see where exactly is this memory is being used.

from tg-filestreambot.

CodeObser avatar CodeObser commented on June 2, 2024 2

😶

from tg-filestreambot.

EverythingSuckz avatar EverythingSuckz commented on June 2, 2024

@pdisk This error might be due to too many users using your server, I highly advice you to use multi client feature to reduce the load of the server. And about the RAM usage, Try setting the USE_SESSION_FILE var to True to use a storage file rather than saving the session files in memory which consumes more RAM. If you still have issues, please attach the logs as a pastebin link next time.

from tg-filestreambot.

pdisk avatar pdisk commented on June 2, 2024

@EverythingSuckz Yes I already use it with multi_client mode with 10 bots in total and USE_SESSION_FILE var Has Already been set to True, i think it should work without this error if the program isn't restarting cuz of ram usage
when the program restarts even with session file the bots are made to get all media session again at once which may be the reason for this floodwait (just my assumption). If that was the case then shouldn't the bot be taking the media sessions from session file instead of getting new fresh ones all at once?

Error: https://pastebin.com/Nw8PJECf

from tg-filestreambot.

EverythingSuckz avatar EverythingSuckz commented on June 2, 2024

@EverythingSuckz Yes I already use it with multi_client mode with 10 bots in total and USE_SESSION_FILE var Has Already been set to True, i think it should work without this error if the program isn't restarting cuz of ram usage when the program restarts even with session file the bots are made to get all media session again at once which may be the reason for this floodwait (just my assumption). If that was the case then shouldn't the bot be taking the media sessions from session file instead of getting new fresh ones all at once?

Error: https://pastebin.com/Nw8PJECf

Not sure about the fact whether pyrogram tried to get media sessions on startup. Like, there are only 5 Telegram DC IDs and we only need 5 media sessions per bot. I don't really understand why Telegram gives floodwait for that even tho media session is being cached and even if it's not cached, it only makes like 5 request at max. Looks like I need to check this issue.
Also about the ram usages, normally it won't take much ram when you use a session file btw. Seems like there might be something that's eating up the memory.

from tg-filestreambot.

pdisk avatar pdisk commented on June 2, 2024

@EverythingSuckz This error doesn't stop the program and instead the error is shown every time a file is taken, are there any work around u can suggest to temporarily solve the issue

or if any suggestions to pin point the error, I'll send more logs and findings

(i had to modify the code to take files from multiple channels by passing the channel id along with messageid and had to remove the hash checking part for it) still i don't think that can cause this FloodWait

from tg-filestreambot.

EverythingSuckz avatar EverythingSuckz commented on June 2, 2024

@EverythingSuckz This error doesn't stop the program and instead the error is shown every time a file is taken, are there any work around u can suggest to temporarily solve the issue

or if any suggestions to pin point the error, I'll send more logs and findings

(i had to modify the code to take files from multiple channels by passing the channel id along with messageid and had to remove the hash checking part for it) still i don't think that can cause this FloodWait

So you've modified it? Well then I can't really make sure about the bug since I've hosted the bot with 20 clients and there were no such issues. Maybe provide more logs?

from tg-filestreambot.

pdisk avatar pdisk commented on June 2, 2024

i fixed the issue with asyncio.Lock()

when server was restarted all the request came at once making the script to generate_media_session multiple times before checking if the function has already been executed with a lock for each bot and each dcid i was able to solve the issue

from tg-filestreambot.

pdisk avatar pdisk commented on June 2, 2024

@EverythingSuckz i Still Couldn't Figure out what's causing the intense ram usage tho
with 10 bots each with work load of 15 (150 in total) at maximux load the ram usage goes up like there is no tomorrow
its not an issue with my modification as i only changed the part of url to get chatid with messageid

no other variables or functions has been written as mod

without even a single error the ram usage spike to 1.2 or more if i allow it to

from tg-filestreambot.

EverythingSuckz avatar EverythingSuckz commented on June 2, 2024

i fixed the issue with asyncio.Lock()

when server was restarted all the request came at once making the script to generate_media_session multiple times before checking if the function has already been executed with a lock for each bot and each dcid i was able to solve the issue

Oh, if you think it's a major issue, then feel free to do a PR.

from tg-filestreambot.

EverythingSuckz avatar EverythingSuckz commented on June 2, 2024

@EverythingSuckz i Still Couldn't Figure out what's causing the intense ram usage tho with 10 bots each with work load of 15 (150 in total) at maximux load the ram usage goes up like there is no tomorrow its not an issue with my modification as i only changed the part of url to get chatid with messageid

no other variables or functions has been written as mod

without even a single error the ram usage spike to 1.2 or more if i allow it to

Seems like I'll have to profile the memory usage and see where exactly is this memory is being used.

from tg-filestreambot.

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.