21 Apr, 2009, Banner wrote in the 21st comment:
Votes: 0
What settings are you using within your apache2.conf file, and are you using prefork or worker mode?
21 Apr, 2009, Zeno wrote in the 22nd comment:
Votes: 0
Yeah, I have issues with my webserver on my VPS taking up most of the mem. :/

At nearly 300MB total. 12 httpd processes, 11 MySQL processes. My 3 MUD processes obviously barely take up any mem.
(Technically my mem limit is 256)
21 Apr, 2009, Hades_Kane wrote in the 23rd comment:
Votes: 0
Banner said:
What settings are you using within your apache2.conf file, and are you using prefork or worker mode?


I'll have to check, but I seem to recall just installing apache, setting up the stuff so my various domains will point to the right place, and it was fine from there.
21 Apr, 2009, David Haley wrote in the 24th comment:
Votes: 0
When you look at the memory usage, are you sure you're not double-counting shared memory?
21 Apr, 2009, Banner wrote in the 25th comment:
Votes: 0
I'm just checking the memory useage via top..

Lighttpd off
Mem:    262144k total,    77432k used,   184712k free,        0k buffers
Swap: 0k total, 0k used, 0k free, 0k cached


PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND                                                                                                              
1 root 15 0 1988 688 588 S 0 0.3 0:00.16 init
5379 root 18 0 1700 596 488 S 0 0.2 0:00.04 syslogd
5388 root 25 0 1648 396 324 S 0 0.2 0:00.00 klogd
5396 root 15 0 5276 1020 672 S 0 0.4 0:00.01 sshd
5436 root 20 0 2704 1308 1076 S 0 0.5 0:00.00 mysqld_safe
5465 mysql 15 0 54620 7680 4584 S 0 2.9 0:00.21 mysqld
5466 root 24 0 1636 532 456 S 0 0.2 0:00.00 logger
5508 daemon 18 0 1916 432 312 S 0 0.2 0:00.00 atd
5523 root 18 0 2040 880 704 S 0 0.3 0:00.00 cron
5965 daemon 18 0 1772 500 404 S 0 0.2 0:00.00 portmap
6001 root 24 0 3144 504 352 S 0 0.2 0:00.00 famd
6142 root 18 0 8024 2620 2160 S 0 1.0 0:00.01 sshd
7234 root 16 0 3660 2424 1256 S 0 0.9 0:00.11 bash
11938 root 15 0 2260 1072 872 R 0 0.4 0:00.00 top
15586 shoie13 18 0 1744 612 500 S 0 0.2 0:00.02 startup
15593 shoie13 18 0 18872 16m 2736 S 0 6.5 1:20.53 swreality

Lighttppd on:
Mem:    262144k total,   179856k used,    82288k free,        0k buffers
Swap: 0k total, 0k used, 0k free, 0k cached


PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND                                                                                                              
12060 root 15 0 2260 1072 872 R 0 0.4 0:00.01 top
1 root 15 0 1988 688 588 S 0 0.3 0:00.16 init
5379 root 18 0 1700 596 488 S 0 0.2 0:00.04 syslogd
5388 root 25 0 1648 396 324 S 0 0.2 0:00.00 klogd
5396 root 15 0 5276 1020 672 S 0 0.4 0:00.01 sshd
5436 root 20 0 2704 1308 1076 S 0 0.5 0:00.00 mysqld_safe
5465 mysql 15 0 54620 7680 4584 S 0 2.9 0:00.21 mysqld
5466 root 24 0 1636 532 456 S 0 0.2 0:00.00 logger
5508 daemon 18 0 1916 432 312 S 0 0.2 0:00.00 atd
5523 root 18 0 2040 880 704 S 0 0.3 0:00.00 cron
5965 daemon 18 0 1772 500 404 S 0 0.2 0:00.00 portmap
6001 root 24 0 3144 504 352 S 0 0.2 0:00.00 famd
6142 root 15 0 8024 2628 2160 R 0 1.0 0:00.01 sshd
7234 root 18 0 3660 2424 1256 S 0 0.9 0:00.11 bash
12034 www-data 18 0 5728 1604 800 S 0 0.6 0:00.00 lighttpd
12035 www-data 18 0 33168 6540 4508 S 0 2.5 0:00.02 php-cgi
12038 www-data 19 0 33172 6536 4508 S 0 2.5 0:00.02 php-cgi
12044 www-data 18 0 33168 6536 4508 S 0 2.5 0:00.02 php-cgi
12045 www-data 18 0 33172 6540 4508 S 0 2.5 0:00.02 php-cgi
12086 www-data 18 0 33120 2340 316 S 0 0.9 0:00.00 php-cgi
12087 www-data 19 0 33172 2344 316 S 0 0.9 0:00.00 php-cgi
12090 www-data 18 0 33116 2336 316 S 0 0.9 0:00.00 php-cgi
12091 www-data 18 0 33116 2340 316 S 0 0.9 0:00.00 php-cgi
15586 shoie13 18 0 1744 612 500 S 0 0.2 0:00.02 startup
15593 shoie13 18 0 18872 16m 2736 S 0 6.5 1:20.60 swreality
21 Apr, 2009, David Haley wrote in the 26th comment:
Votes: 0
You can probably reconfigure fastcgi to not load up so many processes. You'll get slower response times (can only handle so many requests at once) but you won't use as much memory.

Note that lighttpd itself is using next to no memory; your problem is coming from the fastcgi processes.
21 Apr, 2009, Banner wrote in the 27th comment:
Votes: 0
Currently using:
fastcgi.server    = ( ".php" =>
((
"bin-path" => "/usr/bin/php-cgi",
"socket" => "/tmp/php-cgi.socket",
))
)


Tried using this as referenced from http://redmine.lighttpd.net/wiki/lighttp...:
fastcgi.server = ( ".php" =>
(( "socket" => "/tmp/php-fastcgi.socket",
"bin-path" => "/usr/local/bin/php",
"bin-environment" => (
"PHP_FCGI_CHILDREN" => "16",
"PHP_FCGI_MAX_REQUESTS" => "100" ),
"bin-copy-environment" => (
"PATH", "SHELL", "USER" )
))
)


That ended up sucking up even more memory, but I'm not sure of the settings for that as I'm not familiar with fastcgi so I don't know what to use to correctly limit memory usage.
21 Apr, 2009, David Haley wrote in the 28th comment:
Votes: 0
I don't know much about this and haven't read the docs, but I suspect this is the culprit:
"PHP_FCGI_CHILDREN" => "16",

Try making that 2 or 4 or something like that.
21 Apr, 2009, Banner wrote in the 29th comment:
Votes: 0
2 makes it

Mem:    262144k total,   225200k used,    36944k free,        0k buffers
Swap: 0k total, 0k used, 0k free, 0k cached
21 Apr, 2009, David Haley wrote in the 30th comment:
Votes: 0
How many processes are running? It's hard to make sense of the numbers unless there's a very tight control on the other parameters. I'm surprised that we've used up an extra 50mb of memory here…
21 Apr, 2009, Banner wrote in the 31st comment:
Votes: 0
Mem:    262144k total,   231364k used,    30780k free,        0k buffers
Swap: 0k total, 0k used, 0k free, 0k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1 root 18 0 1988 688 588 S 0 0.3 0:00.17 init
5379 root 18 0 1700 596 488 S 0 0.2 0:00.08 syslogd
5388 root 25 0 1648 396 324 S 0 0.2 0:00.00 klogd
5396 root 18 0 5276 1020 672 S 0 0.4 0:00.05 sshd
5436 root 20 0 2704 1308 1076 S 0 0.5 0:00.00 mysqld_safe
5465 mysql 18 0 54620 7984 4644 S 0 3.0 0:00.36 mysqld
5466 root 24 0 1636 532 456 S 0 0.2 0:00.00 logger
5508 daemon 18 0 1916 432 312 S 0 0.2 0:00.00 atd
5523 root 18 0 2040 880 704 S 0 0.3 0:00.00 cron
5965 daemon 18 0 1772 500 404 S 0 0.2 0:00.00 portmap
6001 root 24 0 3144 504 352 S 0 0.2 0:00.00 famd
6142 root 15 0 8024 2628 2160 R 0 1.0 0:00.11 sshd
7234 root 15 0 3660 2428 1260 S 0 0.9 0:00.12 bash
7342 www-data 15 0 5840 1700 832 S 0 0.6 0:00.00 lighttpd
7343 www-data 22 0 33168 6528 4500 S 0 2.5 0:00.01 php-cgi
7346 www-data 22 0 33168 2344 316 S 0 0.9 0:00.00 php-cgi
7347 www-data 22 0 33168 2344 316 S 0 0.9 0:00.00 php-cgi
7348 www-data 21 0 33172 6528 4500 S 0 2.5 0:00.02 php-cgi
7353 www-data 21 0 33172 2344 316 S 0 0.9 0:00.00 php-cgi
7354 www-data 21 0 33172 2344 316 S 0 0.9 0:00.00 php-cgi
7355 www-data 20 0 33168 6528 4500 S 0 2.5 0:00.01 php-cgi
7357 www-data 20 0 33116 2336 316 S 0 0.9 0:00.00 php-cgi
7358 www-data 20 0 33116 2336 316 S 0 0.9 0:00.00 php-cgi
7359 www-data 20 0 33168 6528 4500 S 0 2.5 0:00.02 php-cgi
7361 www-data 15 0 35344 7744 3112 S 0 3.0 0:00.62 php-cgi
7362 www-data 16 0 34600 6964 3088 S 0 2.7 0:00.55 php-cgi
15586 shoie13 18 0 1744 612 500 S 0 0.2 0:00.02 startup
15593 shoie13 18 0 18872 16m 2744 S 0 6.5 1:29.93 swreality
28278 root 18 0 2264 1080 872 R 0 0.4 0:00.00 top
21 Apr, 2009, David Haley wrote in the 32nd comment:
Votes: 0
You started with 8, you have 12 now… so something didn't work. You should check what happens when you shut down lighttpd – make sure that there aren't any processes left. If there are, kill them. Then see what happens when you start up again and hit php pages a few times.
22 Apr, 2009, Banner wrote in the 33rd comment:
Votes: 0
I have. There are no lighttpd processes or php-cgi, and the memory is totally freed up, then I start it and there should be no one on the website, unless the forum is drawing load with no one on it.. but then it's already using that much memory at startup.
22 Apr, 2009, Banner wrote in the 34th comment:
Votes: 0
I reinstalled my Distro, chose Debian 5.0 (they only offered 4.0 when I purchased the account), and now Lighttpd with php support and it's only using:

Tasks:  15 total,   1 running,  14 sleeping,   0 stopped,   0 zombie
Cpu(s): 0.6%us, 0.2%sy, 0.0%ni, 98.6%id, 0.6%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 524288k total, 57608k used, 466680k free, 0k buffers
Swap: 0k total, 0k used, 0k free, 0k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1 root 15 0 1984 684 588 S 0 0.1 0:00.11 init
1694 www-data 15 0 5692 1464 652 S 0 0.3 0:00.00 lighttpd
1702 root 15 0 2256 984 792 R 0 0.2 0:00.00 top
1801 shoie13 18 0 1744 612 500 S 0 0.1 0:00.03 startup
1809 shoie13 18 0 18216 15m 2228 S 0 3.0 0:03.25 swreality
15422 root 24 0 1712 520 432 S 0 0.1 0:00.00 mysqld_safe
15473 mysql 16 0 36064 5332 4216 S 0 1.0 0:00.05 mysqld
15474 root 25 0 1636 532 456 S 0 0.1 0:00.00 logger
15823 root 18 0 4988 1008 660 S 0 0.2 0:00.00 sshd
15827 daemon 25 0 1916 432 312 S 0 0.1 0:00.00 atd
15831 root 22 0 2044 872 704 S 0 0.2 0:00.00 cron
15869 root 21 0 7892 2520 2004 S 0 0.5 0:00.49 sshd
15881 root 15 0 4520 1388 1088 S 0 0.3 0:00.00 sftp-server
16004 root 18 0 2856 740 552 S 0 0.1 0:00.00 syslog-ng
22297 root 15 0 2724 1448 1180 S 0 0.3 0:00.00 bash


Noted, however, that I changed mysql to use less memory, scripts will run with dash instead of bash, and several other tiny things I changed to make it use as little memory as possible, via this link: http://www.lowendbox.com/blog/yes-you-ca...

Although I'm not entirely sure where the extra memory came from.. it's burstable but I didn't think it'd show up like that or if it'll go away at all. I will still need to test the webserver serving pages and my forum to see if it stays so low.
22 Apr, 2009, Banner wrote in the 35th comment:
Votes: 0
Does anyone have an install guide link or tips on how to install mail for the webserver? It seems my forum isn't sending out php mail, which is a problem since people won't even be able to activate new accounts. While that is the primary goal, a secondary one to be able to receive emails directed to my domain would be nice, and whatever fixes both of those problems is my goal. Anyone?
22 Apr, 2009, Zeno wrote in the 36th comment:
Votes: 0
If you use php mail(), it should be okay. What error are you getting? sendmail should be installed already too.
22 Apr, 2009, Banner wrote in the 37th comment:
Votes: 0
Where do I check for errors? I had someone send a PM to me on my forum and I got the PM, but not the email notification. Sendmail had to be installed, not sure if there was more configuration necessary or not. I did check /var/mail/www-data and there was some emails it apparently failed to send earlier about SMF database connection problems, but there was none about any failed emails from when I was just testing it.
22 Apr, 2009, Zeno wrote in the 38th comment:
Votes: 0
Is it set to use mail() or sendmail? Either way, whatever one it is using test that out normally (in the shell) outside the forums and see what happens.
22 Apr, 2009, Banner wrote in the 39th comment:
Votes: 0
Zeno said:
Is it set to use mail() or sendmail? Either way, whatever one it is using test that out normally (in the shell) outside the forums and see what happens.

Where would the error log be at to tell me why it failed?
22 Apr, 2009, David Haley wrote in the 40th comment:
Votes: 0
/var/log is where most logs go. It'll be in there somewhere…
20.0/59