TLE
TLE copied to clipboard
Killed process - Out of memory every two days
Recently, it seems TLE has been consuming quite a lot of memory and the kernel kills it every 1 to 2 days.
I'm running the bot on a Standard DigitalOcenan's Ubuntu Droplet with the following specifications:
- Memory: 1GB
- Disk space: 25GB
The concerning message when running dmesg
on the console is the following:
[1039632.932348] Out of memory: Kill process 1287 (python) score 740 or sacrifice child
[1039632.934178] Killed process 1287 (python) total-vm:1902136kB, anon-rss:767216kB, file-rss:0kB, shmem-rss:0kB
I'm not sure if this is a bug or the intended behaviour, but if the latter is the case then a memory limit set by the user might be of use in these situations.
If it helps in anything, here are the last 4 minutes of TLE's log:
27-05-2020 17:42:25:INFO:ContestCache:1295 contests fetched from API
27-05-2020 17:42:25:INFO:ContestCache:1295 contests stored in database
27-05-2020 17:42:26:INFO:EventSystem:Dispatching event `ContestListRefresh`
27-05-2020 17:42:26:INFO:Contests:Refreshed cache
27-05-2020 17:42:26:INFO:Contests:Tasks for guild 702336154292191265 cleared
27-05-2020 17:42:26:INFO:tle.util.codeforces_api:Querying CF API at https://codeforces.com/api/contest.standings with {'contestId': 1309}
27-05-2020 17:42:26:INFO:RanklistCache:Ranklist fetched for contest 1309
27-05-2020 17:42:26:INFO:tle.util.codeforces_api:Querying CF API at https://codeforces.com/api/contest.standings with {'contestId': 1347, 'showUnofficial': 'true'}
27-05-2020 17:42:26:WARNING:tle.util.codeforces_api:Query to CF API failed: HTTP Error 429, Call limit exceeded
27-05-2020 17:42:26:INFO:tle.util.codeforces_api:Try 1/3 at query failed.
27-05-2020 17:42:26:INFO:tle.util.codeforces_api:CallLimitExceededError('Codeforces API call limit exceeded')
27-05-2020 17:42:26:INFO:tle.util.codeforces_api:Retrying...
27-05-2020 17:42:26:INFO:tle.util.codeforces_api:Querying CF API at https://codeforces.com/api/contest.standings with {'contestId': 1347, 'showUnofficial': 'true'}
27-05-2020 17:42:26:INFO:tle.util.codeforces_api:Querying CF API at https://codeforces.com/api/contest.standings with {'contestId': 1347}
27-05-2020 17:42:26:INFO:RanklistCache:Ranklist fetched for contest 1347
27-05-2020 17:44:26:INFO:tle.util.codeforces_api:Querying CF API at https://codeforces.com/api/contest.standings with {'contestId': 1308, 'showUnofficial': 'true'}
27-05-2020 17:44:27:INFO:tle.util.codeforces_api:Querying CF API at https://codeforces.com/api/contest.standings with {'contestId': 1308}
27-05-2020 17:44:27:INFO:RanklistCache:Ranklist fetched for contest 1308
27-05-2020 17:44:27:INFO:tle.util.codeforces_api:Querying CF API at https://codeforces.com/api/contest.standings with {'contestId': 1309, 'showUnofficial': 'true'}
27-05-2020 17:44:27:INFO:tle.util.codeforces_api:Querying CF API at https://codeforces.com/api/contest.standings with {'contestId': 1309}
27-05-2020 17:44:27:INFO:RanklistCache:Ranklist fetched for contest 1309
27-05-2020 17:44:27:INFO:tle.util.codeforces_api:Querying CF API at https://codeforces.com/api/contest.standings with {'contestId': 1347, 'showUnofficial': 'true'}
27-05-2020 17:44:28:INFO:tle.util.codeforces_api:Querying CF API at https://codeforces.com/api/contest.standings with {'contestId': 1347}
27-05-2020 17:44:28:INFO:RanklistCache:Ranklist fetched for contest 1347
27-05-2020 17:46:28:INFO:tle.util.codeforces_api:Querying CF API at https://codeforces.com/api/contest.standings with {'contestId': 1308, 'showUnofficial': 'true'}
27-05-2020 17:46:28:INFO:tle.util.codeforces_api:Querying CF API at https://codeforces.com/api/contest.standings with {'contestId': 1308}
27-05-2020 17:46:28:INFO:tle.util.codeforces_api:Querying CF API at https://codeforces.com/api/user.ratedList with {'activeOnly': 'false'}
This should resolve your issues. :)
"Resolve" is a strong word. Do we leak memory or is it just high usage overall?