Y
Y
yeputons2011-05-24 14:17:04
linux
yeputons, 2011-05-24 14:17:04

VDS with 256MB RAM: Apache+MySQL+mod_php+mod_wsgi+Django?

Good afternoon.
There is a VDS with 256 MB of RAM. It currently has Lenny, Apache2 (with mod_php and without MPM), MySQL.
About 35 meters remain free. Next, put mod_wsgi (Daemon mode) and a simple site on Django. The amount of memory is reduced to 25 meters. When the page starts loading, Apache abruptly starts spawning processes (to return static?) and the memory drops to 14 meters. It would be possible to live if, with each request (for different pages), the memory would not slowly fall to zero, after which you need to restart Apache and everything works again.

Question: where to look / what to read / who is to blame / what can be done?
There is an option to move to something bigger, but I would like to first realize that there is no other way.

Answer the question

In order to leave comments, you need to log in

5 answer(s)
R
RuJet, 2011-05-24
@yeputons

Try reducing the stack size.
skripter.info/linux/sovety/516-kak-mozhno-snizit-potreblenie-operativnoj-pamyati-na-vdsvps-v-2-raza.html

H
homm, 2011-05-24
@homm

Well, tell the Apache not to spawn processes, that's the point.

P
Puma Thailand, 2011-05-24
@opium

Fasten nginx, and in general, 256 megabytes of RAM is not enough for lampa, without terrible optimizations, and even if the load increases slightly above zero, they still won’t be enough.

I
iSlava, 2011-05-24
@iSlava

do you really need all the features of apache? if not - my advice to you: use a bunch of gevent + nginx (or haproxy)

P
pentarh, 2011-05-24
@pentarh

Reducing MySQL memory consumption on VPS
Nginx to return statics and unload apache
Well, here they wrote above about the stack size.
In general, 256M is very small for Apache and database. If xen/kvm/hyperv didn’t go where, the memory is considered “correctly” there and you can swap. And the OpenVZ container will definitely die in OOM.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question