Apache restart problem - Printable Version +- ispCP - Board - Support (http://www.isp-control.net/forum) +-- Forum: ispCP Omega Development Area (/forum-1.html) +--- Forum: General discussion (/forum-11.html) +--- Thread: Apache restart problem (/thread-11203.html) |
Apache restart problem - borzu - 07-19-2010 09:22 AM Hi, First off, thanks for the fantastic panel. I tried a couple of other free panels and none had such a well documentation and smooth installation procedure. However, unfortunately I could not get it up and running at the first strock. After installing ispCP Omega 1.0.5 (until step 3 here) on Debian lenny, I could not access admin.mysite.com page. I figured out that apache daemon was not running and after trying to restart the process it I got this message: Quote:Restarting web server: apache2WARNING: MaxClients (10) must be at least as large This might also help to find out the reason: During the installation, while running 'make install', my 512Mb ram VPS ran out of memory and install failed, so, I stoped mysql and bind, and redone the step. then started the heavy procedures. Here is my current 'top' procedures: Quote:top - 00:31:15 up 1:06, 1 user, load average: 0.00, 0.00, 0.00 I appreciate if you could tell me how to resolve the issue. RE: Apache restart problem - pulponair - 07-21-2010 06:35 PM Hi, first of all you should set the apache process settings to proper values (see warnings). For a 512MB machine i would start with something like this: (assuming you are using the mpm-worker): --- StartServers 2 MaxClients 150 MinSpareThreads 15 MaxSpareThreads 30 ThreadsPerChild 15 MaxRequestsPerChild 0 ThreadStackSize 4000000 --- Cheers, Nikolas RE: Apache restart problem - borzu - 07-22-2010 11:17 AM Thanks Nikolas, Actually first I needed to install apache2-mpm-prefork, as apparently it was not included in ispcp default set up. I applied your suggested settings and now my sandbox vps works fine on about 360 MB memory in contrast to previous 500+MB. Also the restart problem and the 500 error are gone. I am totally noob in apache stuff, used to use nginx (I am loving it . Have you any suggestion to know about apache configuration and optimisation? This giant should somehow be squeezed! I am also a bit put off about the amount of memory that ispcp-apache-lo demon consumes. (currently 3 processes each 1.8%MEM) is there some way to ispcp footprint? RE: Apache restart problem - kilburn - 07-22-2010 04:16 PM Quote:Actually first I needed to install apache2-mpm-prefork, as apparently it was not included in ispcp default set up. I applied your suggested settings and now my sandbox vps works fine on about 360 MB memory in contrast to previous 500+MB. Also the restart problem and the 500 error are gone. You can take a look at the running ispcp on a low resources server "howto" (and contribute to it ). Quote:I am totally noob in apache stuff, used to use nginx (I am loving it Smile . Have you any suggestion to know about apache configuration and optimisation? This giant should somehow be squeezed! Basically proper tunning of the worker and removing any unneeded modules. There's not much more to do in this war... Quote:I am also a bit put off about the amount of memory that ispcp-apache-lo demon consumes. (currently 3 processes each 1.8%MEM) is there some way to ispcp footprint?First of all, you should only have two ispcp-apache-logger instances. Their task is to separate the access and error logs from apache into domain-based files. If you are not going to host a big number of websites (<50), then it is possible to remove them, but it's a bit difficult. Hence, I'll throw the basic ideas over the table and let you work it by yourself if you want - You can tell apache to create custom logfiles for each of your virtualhosts - Nevertheless, if you do it and have a lot of virtualhosts, apache reaches the maximum number of open files and terrible things happen. - Hence, the ispcp team created custom daemons that receive the log lines for all virtualhosts and write the appropiate per-virtualhost files. - But this wasn't done until the first release candidates Therefore, it should be possible to: 1. Disable global logging to the ispcp-apache-logger instances (they use piped logs, so just by commenting the definitions in the apache config and restarting these processes will never get launched again.) 2. Modify the virtualhost templates to tell apache to create the per-virtualhost logs themselve. Look for the proper directives in an oooooold ispcp release templates'. RE: Apache restart problem - pulponair - 07-22-2010 05:27 PM (07-22-2010 11:17 AM)borzu Wrote: Thanks Nikolas, Well actually my settings were related to the apach2-mpm-worker. I'd suggest to use the worker instead of the prefork mpm. Ich you wan't to free some more memory you could safely reduce the ThreadStackSize to 1mb or even 512kb. According to my pmap findings an avarange Apache thread uses arround 90kb of stack space. BTW: i recently found this nice little script somewhere on the we and adapted it to fit my needs. Perphaps it helps you tracing memory usage: http://bin.cakephp.org/view/1742357609 Sample output: ./avg_memory_usage.php apache2 14 "apache2" processes running allocating 327300.00 kb of private memory Average process private memory allocation: 23378.57 kb Cheers, Nikolas |