1

I'm correctly investigating an issue with a Flask application which I run with gunicorn on AWS. The problem is that the function seems not to be fully executed. It just runs to a point where it loads a big CSV file into a pandas dataframe and then it seems to break up.

When I run it locally, things work fine. When I run it on AWS, I see

[2019-05-23 12:00:25 +0000] [20] [INFO] Booting worker with pid: 20

after a while when the request seems to stop.

Why does gunicorn boot that worker? What happened to the worker before? (edit: I start a new thread for the long-running part ... can that be related?)

Martin Thoma
  • 124,992
  • 159
  • 614
  • 958
  • 1
    Could you explain more about what you mean when you say that it breaks up? Listing more of the gunicorn + flask logs would help. How large is the CSV that you're loading into memory, and what EC2 instance type are you running this on? – Nick Walsh Jun 22 '19 at 22:24
  • Are you using CloudFront? API Gateway? ELB? Plain EC2? Why do you think it's gunicorn's fault? – kichik Jun 29 '19 at 01:55
  • Cloud-Front and API gateway and ECS ... But why should that kill workers? – Martin Thoma Jun 29 '19 at 06:04
  • @MartinThoma, I would like to inform you, that your `function doLinesIntersect` in [**your answer**](https://stackoverflow.com/a/15001181) is wrong. It gives me `true` by the points like `A {x: 41, y: 111}, B {x: 117, y: 37}, C {x: 43, y: 112}, D {x: 118, y: 39}`, but it should be `false`. Unfortunately I can not write there. I will delete my comment later. – Bharata Nov 23 '20 at 09:23

0 Answers0