I just wonder if it's possible to define several DocumentRoots for single VirtualHost in httpd.conf and serve them out depending on IP of the visitor?
jayarjo's questions
I have server which runs liquidsoap+icecast bundle and simple website (httpd+mysqld). Nothing special. Visitors around 2000+ per day, with around 50 being online simultaneously on average.
Server has 8GB RAM. As the time goes by, amount of free memory constantly decreases, although nothing new is started on server and there are no new users. At some point it starts to swap, load on server goes up and it becomes unresponsive. Usually what I do is just restart the server...
What can be done to detect what exactly leaks memory? I use top to monitor usage of resources, but as far as I see it shows nothing helpful:
Is there any way to find out what uses that much memory? or what starts to swap to disk heavily? Any way to free up memory without rebooting the server?
Trying to force-download file with PHP using usual:
header("Content-type: $type" );
header("Content-Disposition: attachment; filename=$name");
header('Content-Length: ' . filesize($path));
And it does successfully for files somewhere below 32 mb. For bigger ones it just returns zeroed file.
Obviously there's some kind of limit, but what sets it? Using Apache 2.2.11 and PHP 5.3.0.
I asked this question on stackoverflow but they said that it better fits here. I'm not personally sure since I do not know what causes it in first place. Maybe it's Apache?