#My bot keeps crashing and I don't know why.
1 messages · Page 1 of 1 (latest)
is it crashing, or the process being killed
If it's only happen in the hosting service then I'm pretty sure the hosting service is killing the process
Good point, I'm not sure.
I want to track logs or something.
could just be running out of memory and the kernel kills the process
Is there anyway I can track this?
Are you using any kind of hosting service?
AWS lightsail.
I have a feeling something may be related to this, because every time I try to connect back to the server it's in a state of crash.
i guess u have a snippet which is not async
a code u have it is a blocking
Hmm, even so there would be a traceback pointing to error
if an async function is not awaited, it will raise a warning
What I suspect is the maybe the memory allocated for that instance is low and the bot uses it all up and when tries to use more, it just crashes.
Strange, I've never had something like this occur before, are there any solutions you can propose?
Well, for a start, you could monitor the memory usage of your bot? or maybe a logger that logs everything thats happening to your bot process
How much memory have you allocated in your instance
and how large is your bot ( server wise )?
Thing is it's running on a server with 2 other major processes but I may need to get another server.
But server wise it's not very big. apprx 23 servers I believe.
Memory allocated to the server is..
512mb
And I think I've found the issue
Ah 512mb, I had a feeling that would be the default memory that gets allocated to each instance
23 servers isnt much
Although it depends upon your bot, how resource intensive it is
Mmm, I have 3 other bigger instances. IU reckon I could experiment with a 1gb ram instance and see how it goes.
Well you could monitor the memory usage of your bot process and see what its max is, if it exceeds 512mb, it will cause a crash
Yeah, 1gb for a bot is adequate enough
I think it's the kernel killing the process.
This bot also runs intensive things.
Alright, that sounds like a plan.
I appreciate the help man.
No problem
Are you aware of the solved command? :-) - Found it. 😆