Closed tnakajo closed 4 years ago
As per my testing, I confirmed that the following change in the hello.py
has resolved the issue.
[BEFORE] client = Cloudant(user, password, url=url, connect=True) [AFTER] client = Cloudant(user, password, url=url, connect=True, auto_renew=True)
It seems it was caused by the cookie authentication with the python/cloudant library.
References: https://cloud.ibm.com/docs/Cloudant/api?topic=Cloudant-authentication#cookie-authentication https://python-cloudant.readthedocs.io/en/stable/getting_started.html
I hope it will help.
ISSUE If you leave the application for a few days+ without touching, the app will get the 401 Client Error from the backend cloudant database.
STEPS On the app page, submit a data in the What is your name field. It should work to insert the data in the backend cloudant database. Leave the app for a few days+ without touching. On the app page, submit a data in the What is your name field. The page is not responding. Check the app log or the browser network trace and you'll see the following error from the backend cloudant database.