Ticket #1136 (closed task: fixed)
optimize/rewrite basedir_prot.sh
| Reported by: | anarcat | Owned by: | anonymous |
|---|---|---|---|
| Priority: | high | Milestone: | alternc-1.999 |
| Component: | Shell-scripts et binaires | Version: | alternc-0.9.8 |
| Severity: | major | Keywords: | |
| Cc: |
Description
The current approach to protect accounts from each other using basedir_prot is not scalable.
At koumbit, we currently have a lot of config files in /var/alternc/apacheconf and that leads to performance problems when apache is reloaded (which happens every time someone creates a subdomain anyways).
To give you an idea:
homere:/var/alternc/apacheconf# find -type f | wc 2568 2568 64849
An apache reload can take up to 30 seconds on a busy day, on a Dual Dualcore Xeon 1.6Ghz.
Generating the configuration files during upgrades (in alternc.install, basedir_prot is called without arguments) also takes a looong time (a few minutes).
Therefore, that approach need to be changed. An immediate suggestion that was given by Robin Millette is to stop creating a config file per subdomain but put everything in the same file. He suggested we append at the end of the file and clean it up (ie. remove and regenerate it) once in a while.
That sounds like a neat idea to me.

For those who want to tackle this, the file to modify is source:alternc/trunk/src/basedir_prot.sh