WebFaction
Community site: login faq

My Django site serves a lot of static images and I'm noticing that with a little uptick of traffic, the app's memory usage is going beyond the allotted amount and my app is shutting down.

What's the optimal server setup to handle this sort of situation so I know I'm getting everything I can from my machine?

asked 19 Sep '12, 08:35

aa56280
13514
accept rate: 0%

edited 19 Sep '12, 08:35


Hi,

First, I'd recommend that you set up your site to serve the static images from a static-only application, as described in our docs.

If this still doesn't help, I'd recommend editing your httpd.conf file and reducing the number of threads per process. This might also reduce your memory consumption.

Also, keep in mind that we offer additional 256MB RAM at $7/month. If you decide that you need more memory, you can add it to your account from the Upgrades section in your control panel.

permanent link

answered 19 Sep '12, 09:11

todork
1.2k4
accept rate: 34%

Reduce number of threads per process to what exactly?

This is what I have in my settings now:

WSGIDaemonProcess django processes=1 threads=20

How do I know if that's what I want? I'm not a SysAdmin so I'm hoping you guys can provide more guidance.

(19 Sep '12, 10:30) aa56280

I'd suggest that you reduce them to the default value (12), so the line you quoted would read:

WSGIDaemonProcess django processes=1 threads=12

I'd like to stress again on setting up your site to serve static files through a static-only app. This would mean that when static files are served, this wouldn't consume any of your application memory.

(19 Sep '12, 10:52) todork
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×124
×86

question asked: 19 Sep '12, 08:35

question was seen: 2,073 times

last updated: 19 Sep '12, 10:52

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM