Forums

Error Log not updating

Hey, I'm new to using python anywhere, so it's possible that I may have done something fundamentally wrong, however while debugging, my error log has suddenly stopped updating: https://www.pythonanywhere.com/user/loldraftingaid/files/var/log/loldraftingaid.pythonanywhere.com.error.log

however my website still throws the ''Error code: 502-backend'' error. I've waited a while now to ensure the files have been loaded up. I'm almost certain that there's something wrong with the way I've set up my files, however I cannot debug it without the error log, was wondering if I could get any help.

Hi, 502 backend error usually means that your web app crashed and it's good to look to the server logs then. If you do that, you'll find lot of segmentation fault messages. Error log stopped logging probably because you moved some part of your code to be imported when the app is being set up by wsgi, so it was crashing before it could start. The reason your app is crashing is probably because you're trying to use TensorFlow -- please take a look at this help page: https://help.pythonanywhere.com/pages/MachineLearningInWebsiteCode/ for some more explanation.

Thank you for the response and the additional information. This is disappointing to learn, as Python was specifically chosen due to it's easy of use with machine learning packages such as Tensorflow. The link supplied to me suggested that the use of multithreading is what is causing the issues with Tensorflow? If I were to use another machine learning library such as Sklearn, would that work?

Yes, give Sklearn a go, it should work.

I believe that sklearn should work fine and you could move the ML stuff out of your web app and into a scheduled task or an always on task: https://help.pythonanywhere.com/pages/AsyncInWebApps/