I have a working Python Cloud Foundry app on Bluemix / IBM Cloud that connects to, and otherwise works well with a DB2 on Cloud instance on Bluemix / IBM Cloud.
However, after long intervals (I haven't been able to measure the time), the connection to DB2 closes, and my queries fail. I could modify my code to check for this, but it would be great to be able to adjust the TCP keepalive settings. Something along the lines of this.
Would greatly appreciate any pointers. I'm not sure how one adjusts the client-side settings on a Python Cloud Foundry app.
Cheers.
I tried reproducing this using a Python Flask Cloud Foundry app and a Db2 on Cloud Lite plan instance. My connections seem to stay alive for hours. It might be the python application you are running that has some kind of timeout.