Why is my app being killed?

Hi there, I'm trying to deploy a Flask app onto a linode, and I'm having a bit of trouble.

My server is a nanode, using Ubuntu 19.10.

I've followed Corey Schafers Flask tutorial, and have the server set up nicely and everything is working on port 0.0.0.0 IF I comment out the problematic pickle file:

The problem I'm having is that one of the pickle files which I need to load is quite big (around 400Mb), and I believe that it's timing out the server. The app boots fine when I comment it out (except for the routes whose functionality depends on the file).

All it says when I try to run it is "Killed" after about 30-60s (Hence why I believe it's timing out). I've been Googling around for a solution but I can't find anything, so I'm hoping someone here has some experience with something like this.

I've also tried threading this task, but it also gives me the same error.

Any help, or suggestions for a workaround would be much appreciated.

1 Reply

This may give you a clue:

https://stackoverflow.com/questions/726690/what-killed-my-process-and-why

I suspect your nanode is running out of memory/swap…but that's just a guess on my part.

One thing you can easily try though is to switch your Linode to a different plan that has more memory & disc space (so you can establish/enlarge a swap partition) for a little while and see if your problem goes away (warning: this will cost you some money…however the money may be worth it if your problem is solved).

The lowest-price standard Linode ($10/mo) has twice as much memory and disc space as a nanode. With hourly billing and the ease of resizing Linodes up and down makes doing what I'm suggesting quick and relatively inexpensive. If an experiment of this nature were to last, say, 7 days, the incremental cost would be about $0.36 (this assumes you spun up a new Linode and migrated your app there for 7 days).

I don't work for Linode so I'm not shilling for them.

-- sw

P.S. File a support ticket about sizing a Linode down. I'm not at all sure you can resize a standard Linode down to a nanode so it's better to consult with an expert than rely on my memory.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct