I am using tensorflow 1.4. I installed it using "pip2.7 install upgrade --user tensorflow" command on bash console.

The model is trained. I tried running the model on bash console with a custom input, it worked fine and was giving the result. I recently limiit the number of inter and intra processes to 1 in tf.configproto variables and tried to create a session. The error log still says that resources are not available and worker dies.

Hmm, interesting. I just checked the server where your code was running, and it looks like there were some processes that had been left running, probably detached from earlier instances of your website (eg. before your most recent reloads).

A couple of thoughts:

Is your model using lots of memory?

Are you opening/closing your Tensorflow sessions carefully, for example using with tf.Session() as session: around the code to run stuff?

By "anything external", Conrad meant something like hitting an external API via requests or urllib or something like that -- or, indeed, using those libraries to hit your own site from within the view. Are you doing anything like that?

I know some other PythonAnywhere users are running tensorflow happily though... I'm wondering if it's because you are a free user and you are limited in the the # of threads you can start from a webapp.

Maybe try upgrading and reloading your webapp etc and running it? If it doesn't work just downgrade again (eg within the hour and you won't be charged, or just let us know and we will refund your payment).

The problem was when calling a method from another class from my main flask_app.py. If I run the method directly in the class it works perfectly, but when I trigger that method call from the main app it causes the system error that is above

Hmm, very odd. There seem to be a bunch of different things that can make Tensorflow crash with that error message. Perhaps a good start would be to find out which line of Python code is triggering it. Could you put print statements before each line in your code where you use ChatbotFramework (including the import) so that we can find out? The output of the prints will go to the server log too.

OK -- that sounds like Tensorflow is trying to spin up new threads, and crashing (!) when it can't. If there's some way to configure it to not use extra threads, then it should work -- but if not, it won't work in a PythonAnywhere web app :-(