Ah, that makes sense. Yes, the first time around, that would cause a
lot of load if you've set OCP to run e.g. every minute or so. If the
single process doesn't strain your server much, try to up -c to e.g. 3
or 4 (or some number a few under your number of PHP processes.) That
makes it a LOT faster.
You can still have OCP run every minute if you make sure only one copy
is running at once. If you're on Linux, you can use a script like
this:
#!/bin/sh
LOCKFILE=/tmp/ocp-lock.txt
if [ -e ${LOCKFILE} ] && kill -0 `cat ${LOCKFILE}`; then
# already running
exit
fi
trap "rm -f ${LOCKFILE}; exit" INT TERM EXIT
echo $$ > ${LOCKFILE}
ocp -c 4 -l /var/www/mysite/pgcache -ls _index.html
http://mysite.com/sitemap.xml
rm -f ${LOCKFILE}
The script will do nothing if OCP is already running. If you make a
single sitemapindex and run this every minute or so, I think it would
work to your satisfaction. It wouldn't kill the server, and once the
whole cache is primed (assuming you don't flush the whole cache at
once), every time it runs it'll just prime 50-100 pages or so.
I think I'll add this to the FAQ, or even add a --singleton switch to
OCP. It's hard to make a generalized solution though since Windows is
quite different.
> --
> You received this message because you are subscribed to the Google Groups "Optimus Cache Prime" group.
> To post to this group, send email to
optimus-c...@googlegroups.com.
> To unsubscribe from this group, send email to
optimus-cache-p...@googlegroups.com.
> For more options, visit this group at
http://groups.google.com/group/optimus-cache-prime?hl=en.
>