Repository: Cloud-CV/EvalAI
Issue: Django continuously making API calls to the backend

Hi,
In our production version of leaderboard which was forked out Eval AI, we suddenly see continuous API calls being made from the Django Container.  Please see the logs below.  This is slowing down our environment.

Any idea what is causing so many calls ?

page_size=1000 => generated 4125 bytes in 3697 msecs (HTTP/1.1 200) 5 headers in 155 bytes (1 switches on core 0)
[pid: 31|app: 0|req: 3859/18645] 172.30.13.175 () {58 vars in 1200 bytes} [Fri Jan 15 02:37:03 2021] GET /api/jobs/challenge_phase_split/44/leaderboard/?page_size=1000 => generated 7659 bytes in 3215 msecs (HTTP/1.1 200) 5 headers in 155 bytes (1 switches on core 0)
[pid: 30|app: 0|req: 3801/18646] 172.30.112.108 () {58 vars in 1155 bytes} [Fri Jan 15 02:37:03 2021] GET /api/jobs/challenge_phase_split/43/leaderboard/?page_size=1000 => generated 10318 bytes in 4659 msecs (HTTP/1.1 200) 5 headers in 156 bytes (1 switches on core 0)
[pid: 29|app: 0|req: 3723/18647] 172.30.112.108 () {58 vars in 1156 bytes} [Fri Jan 15 02:37:05 2021] GET /api/jobs/challenge_phase_split/43/leaderboard/?page_size=1000 => generated 10318 bytes in 4056 msecs (HTTP/1.1 200) 5 headers in 156 bytes (1 switches on core 0)
[pid: 26|app: 0|req: 3613/18648] 172.30.112.108 () {58 vars in 1199 bytes} [Fri Jan 15 02:37:06 2021] GET /api/jobs/challenge_phase_split/43/leaderboard/?page_size=1000 => generated 10318 bytes in 3353 msecs (HTTP/1.1 200) 5 headers in 156 bytes (1 switches on core 0)
[pid: 31|app: 0|req: 3860/18649] 172.30.13.175 () {52 vars in 1139 bytes} [Fri Jan 15 02:37:07 2021] GET /api/jobs/challenge_phase_split/44/leaderboard/?page_size=1000 => generated 7659 bytes in 3068 msecs (HTTP/1.1 200) 5 headers in 155 bytes (1 switches on core 0)
[pid: 28|app: 0|req: 3653/18650] 172.30.13.175 () {60 vars in 1265 bytes} [Fri Jan 15 02:37:06 2021] GET /api/jobs/challenge_phase_split/41/leaderboard/?page_size=1000 => generated 1780 bytes in 3823 msecs (HTTP/1.1 200) 5 headers in 155 bytes (1 switches on core 0)
[pid: 30|app: 0|req: 3802/18651] 172.30.112.108 () {58 vars in 1199 bytes} [Fri Jan 15 02:37:08 2021] GET /api/jobs/challenge_phase_split/43/leaderboard/?page_size=1000 => generated 10318 bytes in 3397 msecs (HTTP/1.1 200) 5 headers in 156 bytes (1 switches on core 0)
[pid: 28|app: 0|req: 3654/18652] 172.30.112.108 () {60 vars in 1304 bytes} [Fri Jan 15 02:37:10 2021] GET /api/jobs/challenge_phase_split/41/leaderboard/?page_size=1000 => generated 1780 bytes in 1855 msecs (HTTP/1.1 200) 5 headers in 155 bytes (1 switches on core 0)
[pid: 29|app: 0|req: 3724/18653] 172.30.13.175 () {62 vars in 1334 bytes} [Fri Jan 15 02:37:09 2021] GET /api/jobs/challenge_phase_split/44/leaderboard/?page_size=1000 => generated 7659 bytes in 3183 msecs (HTTP/1.1 200) 5 headers in 155 bytes (1 switches on core 0)
[pid: 31|app: 0|req: 3861/18654] 172.30.112.108 () {62 vars in 1335 bytes} [Fri Jan 15 02:37:10 2021] GET /api/jobs/challenge_phase_split/44/leaderboard/?page_size=1000 => generated 7659 bytes in 2368 msecs (HTTP/1.1 200) 5 headers in 155 bytes (1 switches on core 0)
[pid: 26|app: 0|req: 3614/18655] 172.30.13.175 () {62 vars in 1313 bytes} [Fri Jan 15 02:37:09 2021] GET /api/jobs/challenge_phase_split/46/leaderboard/?page_size=1000 => generated 601 bytes in 3117 msecs (HTTP/1.1 200) 5 headers in 154 bytes (1 switches on core 0)
[pid: 30|app: 0|req: 3803/18656] 172.30.13.175 () {60 vars in 1238 bytes} [Fri Jan 15 02:37:11 2021] GET /api/jobs/challenge_phase_split/41/leaderboard/?page_size=1000 => generated 1780 bytes in 2407 msecs (HTTP/1.1 200) 5 headers in 155 bytes (1 switches on core 0) 

 

Hi @ssaranathan , Thanks for reaching out.

It is because the leaderboard makes API calls to get the latest results and hence there is continuous polling to this API.

@RishabhJain2018 can we implement this using WebSockets through which an event can be emitted when leaderboard data is updated so that we can avoid these unnecessary API calls??

Hi @burnerlee, Thanks for bringing this up but this issue isn't on the roadmap of the project for now.