2014-12-19 Emacs Wiki Migration

(Continued from yesterday.)

yesterday

Right now I’m trying to get a mod_perl setup going. Unfortunately, it still isn’t working. For the moment, I have disabled most of the rewrite rules, such that the main page loads but everything else does not.

a mod_perl setup

Mood: frustrated.

There are many things that still don’t work:

1. git integration (some issues regarding a cleanup that was planned)

2. backup (due to permission issues which I haven’t been able to look into)

3. frequent outages (the page comes up empty) – I’m not sure what is happening, here: processes crashing? taking too long?

4. broken reloads after editing a page (but trying again solves the problem)

5. we lost foreign language support (at the top it will always say SiteMap even if your browser preferences are for a different language)

6. various mod_rewrite rules that I had to disable (not sure whether I want them back!)

SiteMap

And there are probably many more. I haven’t looked at the Elisp Area, RSS feeds, all the cron jobs, etc. Yikes!

memory today

CPU today

Hm, the situation seems to be much better right now. I think the most important thing I changed was that I prevent monit from killing Apache.

monit

Syslog had been showing this pattern a lot:

Dec 20 08:26:34 kallobombus monit[27415]: 'apache' total mem amount of 1267108kB matches resource limit [total mem amount>512001kB]
Dec 20 08:26:34 kallobombus monit[27415]: 'apache' trying to restart
Dec 20 08:26:34 kallobombus monit[27415]: 'apache' stop: /etc/init.d/apache2
Dec 20 08:26:42 kallobombus monit[27415]: 'apache' start: /etc/init.d/apache2
...
Dec 20 08:28:42 kallobombus monit[27415]: 'apache' total mem amount of 571704kB matches resource limit [total mem amount>512001kB]
Dec 20 08:28:42 kallobombus monit[27415]: 'apache' trying to restart
Dec 20 08:28:42 kallobombus monit[27415]: 'apache' stop: /etc/init.d/apache2
Dec 20 08:28:54 kallobombus monit[27415]: 'apache' start: /etc/init.d/apache2

Basically this was telling me that Apache wasn’t running out of memory – monit was killing Apache when it *thought* Apache was using too much memory.

I made some changes to the new rules regarding Apache in `/etc/monit/monitrc`.

check process apache with pidfile /var/run/apache2.pid
   group www
   start program = "/etc/init.d/apache2 start"
   stop program  = "/etc/init.d/apache2 stop"
   if failed host alexschroeder.ch port 80 protocol http
      and request "/monit/token" then restart
1.  if cpu is greater than 60% for 2 cycles then alert
1.  if cpu > 80% for 5 cycles then restart
1.  if totalmem > 500 MB for 5 cycles then restart
   if children > 250 then restart
1.  if loadavg(5min) greater than 10 for 8 cycles then stop
   if 3 restarts within 5 cycles then timeout

Basically, since almost everything I’m doing on this server involves Apache, I’m no longer interested in holding it back. Use all the CPU if you want, Apache. Use all the memory if you want, Apache. If mod_perl means big memory footprint, then so be it. We’ve got a lot of requests to serve.

https://alexschroeder.ch/pics/16062737735_3034fd5cd7_o.png

https://alexschroeder.ch/pics/15443081663_d5a398c249_o.png

(Continued here.)

here

​#Emacs ​#Git ​#Oddmuse ​#Administration ​#devops