Skip to content

Terminate AppServer when process is over soft memory cap#82

Merged
shatterednirvana merged 3 commits intoAppScale:testingfrom
nlake44:softmem-cap
Nov 13, 2012
Merged

Terminate AppServer when process is over soft memory cap#82
shatterednirvana merged 3 commits intoAppScale:testingfrom
nlake44:softmem-cap

Conversation

@nlake44
Copy link
Copy Markdown
Contributor

@nlake44 nlake44 commented Nov 1, 2012

Currently the Python AppServer in AppScale (adapted from the SDK Google gives out) leaks memory. To reproduce this, run the guestbook application and post to it. From this point on, even if a user only performs read operations, the AppServer will leak memory.

This pull request terminates the Python AppServer if it uses more memory than a preset threshold. Investigation using the objgraph python library shows that there is a dictionary growing by 2 (could also be two dictionaries growing 1 each) and a list growing by 1. Which list and which dictionary requires further investigation.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand this comment. Should this instead be something like "The probability that we should terminate an AppServer that has exceeded its memory limit"?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed.

@ghost ghost assigned shatterednirvana Nov 6, 2012
shatterednirvana added a commit that referenced this pull request Nov 13, 2012
Terminate AppServer when process is over soft memory cap
@shatterednirvana shatterednirvana merged commit 8f8abaf into AppScale:testing Nov 13, 2012
@nlake44
Copy link
Copy Markdown
Contributor Author

nlake44 commented Nov 15, 2012

@shatterednirvana To test this set the SOFT_CAP_MEM to a lower number like 55000. Upload guestbook with --appengine 20 and run ab tool against it.
ab -n 1000000 -c 10 http://ip:8080/
Run htop and see if application servers are being killed.

@shatterednirvana
Copy link
Copy Markdown
Contributor

Why should I lower the SOFT_CAP_MEM? That doesn't make sense, because then I'm testing something other than your fix.

@shatterednirvana
Copy link
Copy Markdown
Contributor

This doesn't work for me - I get an ImportError on the random class. Working on a fix now.

nlake44 added a commit to nlake44/appscale that referenced this pull request Sep 30, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants