Check RAM overuse OSWriteError


I have tried to deploy an app and had some troubles with pages loading indefinitely long (in the background, an NLP model is supposed to work).

To debug things, I have :

1 - commented the line using the model and return a dummy result -> page loads

2 - uncommented that line again (but I don't use the model's results, just make it encode the data but the result is the same dummy result as in step 1 -> the page doesn't load and I have the OSwriteError all the while I don't disconnect from the page and my internet is stable (ethernet).

3 - verified, with a print, that the model is imported/loaded into a variable named 'model' (it prints the architecture correctly).

Hence, the only difference between these 2 experiments is : do I call model.encode(data) before I return my dummy result?

(The data is of negligible size (just a list of 5 sentences basically) and my code works locally on my machine).

As such, I was beginning to think that maybe it has to do with the RAM usage, and I wanted to know if there is a way to check that ?

Thanks for your time reading me !


See our help page on using machine learning in web apps:

Yes thanks, it solved it ! I found that article shortly after I posted here but then I didn't know how to delete the post, sorry for the trouble !

Glad to hear that you made it work!