This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: Python on Docker container using flask is going down after sometime
Type: crash Stage: resolved
Components: Interpreter Core Versions: Python 3.5
Status: closed Resolution: third party
Dependencies: Superseder:
Assigned To: Nosy List: Windson Yang, anton.barkovsky, cheryl.sabella, pablogsal, sri_spl
Priority: normal Keywords:

Created on 2018-10-12 14:20 by sri_spl, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Messages (8)
msg327586 - (view) Author: Srikanth (sri_spl) Date: 2018-10-12 14:20
We are have created Python 3.5 image on docker container.

All applications which are running on non-flask are working fine, but applications which are running on flask 0.12.2 are failing after prolonged usage of the application (Approx after 12 hours).
Note: We have enabled heart beat check for python to make sure the container is up which hits every 10 seconds.
After approx 12 hours, the application is stopping to respond to heart beat.

Any expert suggestion plz.
msg327587 - (view) Author: Anton Barkovsky (anton.barkovsky) * Date: 2018-10-12 14:27
Do you have any evidence to believe that this is caused by a bug in CPython itself or its stdlib? If not, it's probably an issue with your code, libraries, or environment, and so out of scope in this tracker.
msg327589 - (view) Author: Srikanth (sri_spl) Date: 2018-10-12 14:35
Thank you so much for quick response. I am not pretty sure, but below are the findings so far.

The same docker container is used by 30+ applications. All applications are working fine until last week and all of a sudden all apps are going down one by one. Our preliminary analysis is all projects using flask are going down where as apps not using flask are good.
We use Kubernetes service layer, so we are checking if there is anything suspicious upgrade happened there as well.
I am trying to explore more to see if anybody faced such issues with flask

Thanks much for taking time
msg327590 - (view) Author: Windson Yang (Windson Yang) * Date: 2018-10-12 14:54
Hello, Srikanth, We can't fix/find the bug by the info you give, Would you mind provide the traceback log after crashing?
msg327592 - (view) Author: Srikanth (sri_spl) Date: 2018-10-12 14:57
@Windson Yang
The container is neither crashing nor responding for requests. Is there a way I can pull any dumps or tracelog, so I can gather and give it to you
msg329010 - (view) Author: Windson Yang (Windson Yang) * Date: 2018-10-31 20:02
Hello, Srikanth, I think you have to look through the docker documents like
msg329013 - (view) Author: Pablo Galindo Salgado (pablogsal) * (Python committer) Date: 2018-10-31 20:17
What version of Python are you using? 

There is very few things we can do on out side if you don't provide some reproducer or some evidence that CPython is the source of this problem and not your application code or a third party module.

Could you try to attach a reproducer?
msg338124 - (view) Author: Cheryl Sabella (cheryl.sabella) * (Python committer) Date: 2019-03-17 09:58
As no additional information has been provided, I'm going to close this as third party.  Feel free to reopen if a reproducing script can be created to demonstrate that this is a bug in the language and not an issue with Flask or Docker.  Thanks!
Date User Action Args
2022-04-11 14:59:07adminsetgithub: 79146
2019-03-17 09:58:54cheryl.sabellasetstatus: open -> closed

nosy: + cheryl.sabella
messages: + msg338124

resolution: third party
stage: resolved
2018-10-31 20:17:47pablogsalsetnosy: + pablogsal
messages: + msg329013
components: + Interpreter Core, - Tests
2018-10-31 20:02:06Windson Yangsetmessages: + msg329010
2018-10-12 14:57:22sri_splsetmessages: + msg327592
2018-10-12 14:54:18Windson Yangsetnosy: + Windson Yang
messages: + msg327590
2018-10-12 14:35:00sri_splsetmessages: + msg327589
2018-10-12 14:27:51anton.barkovskysetnosy: + anton.barkovsky
messages: + msg327587
2018-10-12 14:20:59sri_splcreate