May 9th, 2001

Cunts
  • jhf

(no subject)

I'm attempting to install the latest LiveJournal-server snapshot on my RedHat 7.1 box, largely blindly following the INSTALL instructions, like this one:

Now test this by going to the web addess you set the VHOST for. You should recieve the main LiveJournal page. If you recieve a BML error from the parser ('Unable to load configuration file'), you may wish to edit cgi-bin/ljconfig.pl and manually add a path before all references to bmlp.cfg

Yeah, I'm getting the error, but there are no references to bmlp.cfg in ljconfig.pl . rgrep'ing for bmlp.cfg in cgi-bin shows a couple of different files.

So before I delve into BML, does anyone see a reason why I'm having a problem with this? I haven't set up the database yet; that's about the last thing I have to do, it seems.

Bash Brad's Code!

Now's your chance to make fun of my C! I wrote a candidacy function for mod_backhand to better utilize the resources on all the machines. Before we were throwing out the most loaded machine, then picking a random machine. The problem with that was that one machine was always totally idle for a minute while its load dropped.

I thought a better way to keep it random but also prevent any one server from getting really loaded was to randomonly throw out 1 or 2 of them, using their load as a weight. (i.e... the most loaded server is most likely to be thrown out of consideration to handle a request when it comes in) This ensures that even the most loaded machine is still doing work when it's the most loaded.

I wrote the function to do this, ran it for awhile, it seemed to kinda work, but then httpds on the master started eating lots of CPU. So, I think I have a bug. Brownie points to whoever finds it!

Collapse )

bike
  • jnala

notes on the latest release

Ordered by decreasing importance/difficulty ratio:

  • cgi-bin/bml/scheme/global.look sets SITEROOT to be http://www.$DOMAIN and ignores $SITEROOT from ljconfig.pl. This breaks if $SITEROOT is, say, livejournal.$DOMAIN.
  • A few files have messed-up permissions, breaking the default installation:

    livejournal% find . -type f -not -perm -4 -print
    ./htdocs/dev/applet/index.html
    ./cgi-bin/404notfound.cgi
    ./cgi-bin/bmlp.cfg

    If everything should be world-readable, you could fix slips like this in release.pl.
  • ljconfig.pl: $LJDOTCOM should default to 0, %DBINFO needs a clearer explanatory comment (usual case is no slave)
  • cgi-bin/perl.core doesn't belong there. Make release.pl delete corefiles.
  • aspell is required. ljconfig.pl should allow the user to undef $SPELLER, with a comment that this is required if aspell is not installed, and update.bml should refrain from printing the spellcheck checkbox and message (line 180 of update.bml) if $SPELLER is undef.
  • images.tar.gz should have a version number.
  • Upgrading schema really needs to be done better... "if you're upgrading from X or earlier, execute blah.sql. if you're upgrading from Y or earlier, execute blugh.sql." I had no idea which ones to use, I just ran them all and prayed. :-)
  • What if perl isn't in /usr/bin? Whenever I upgrade I have to run perl -pi.bak -e 's,/usr/bin/perl,/u0/ccare/bin/perl,' $(grep -l /usr/bin/perl **/*(.x)) or something like that to change all the paths, since our Perl installation is NFS-mounted off /u0. /usr/local/bin is also a common place for Perl. Maybe an installer?