Baseball Toaster Fairpole
Help
Server Is Upgraded...Almost
2005-08-11 04:44
by Ken Arneson

Update 2:: Still had some trouble getting the site up, and then I had to leave because my daughter was getting five teeth pulled. Sorry, she takes priority over y'all.

So I restarted the server, but I may have to bounce it a couple more times before it's running smoothly again.

Update: No sooner did I post the following than our ISP shut down our server, for some reason. So we were down for five hours over night because of my stuff, then we were down an additional three hours because of our ISP. ISP says it was a "kernel failure". OK, whatever...

I also got a (bogus) $250 parking ticket from an AC Transit cop yesterday. If the A's hadn't won last night, I'm not sure how many things there'd be around my house that weren't smashed.

Original post:

Well, the upgrade took me a heck of a lot longer than I thought it would. One of these days, I'm gonna pay for a development environment that's identical to the production one, so I can figure these problems out before it affects y'all. Perhaps after we get some revenues coming in...

I was trying to do two things:

  • Remove some database indexes that didn't look like they were being used (which slowed down inserting new data, such as comments)
     
  • Switch over from a non-threaded Apache server to a threaded one, to see if that would help speed things up.

Seems that you can't just drop an index in MySql and forget about it. MySql then wants to rebuild all the indexes on that table. That took a while, about 10 minutes per index.

Then when I upgraded the Apache server, mod_perl wasn't happy anymore. So I had to recompile it, and reinstall it, and that broke some code. So I had to fix the code to work with the new version of mod_perl.

Then when all that was over, it seems that I needed one of those dropped indexes after all, because the site was slower than ever. So I had to figure out which of those indexes I dropped was the one I still needed with some step-by-step debugging. So I had to recreate that index again, which meant rebuilding all the indexes on that table, which again took time.

I finally got the site working at about 4:30am. But then it seemed a little unstable, so I backed out the threaded version, and went back to the non-threaded server, because I need some sleep.

So if the site seems slow or has a bug or two, I'll fix it when I wake up. Perhaps I should set my alarm for the A's game at 12:35...

Anyway, thanks for your patience...

Comments
2005-08-11 11:47:18
1.   Jon Weisman
What do you have to do to get a $250 parking ticket? Park in a zone for handicapped firefighters?
2005-08-11 11:54:12
2.   Sam DC
yeah, yeah, yeah, but when's the next Humbugardy question?
2005-08-11 12:00:39
3.   Ken Arneson
I pulled over to pick up somebody in a "bus stop zone", even though I was at least 25 feet shy of the bus stop sign and the curb was not marked in any manner.
2005-08-11 12:01:56
4.   scareduck
Pretty much the MySQL reaction to any ALTER TABLE query is to rebuild the table from scratch. That's true even for column or table renames, which is stupid.
2005-08-11 12:05:07
5.   Ken Arneson
Yeah, I'm pretty new to MySql, having mostly worked with Informix and Ingres in the past. Rebuilding the table just to add or remove an index seems silly, but you get what you pay for, I guess.
2005-08-11 15:32:42
6.   Kenny
Five teeth? Ouch!
2005-08-11 16:27:32
7.   Jon Ericson
Are the RSS feeds working? I haven't seen a new Dodger's Thoughts post in Thunderbird since the one on 2005-08-07 21:07. Looking at https://rss.baseballtoaster.com/blogs/dodgerthoughts.xml, I wonder if it's a reader error, though.

I work on Oracle and MySQL in my day-job and the only thing I kinda like about MySQL is the readline support in the command line client. I've heard good things about PostgreSQL, but I've only played around with it a little. Once you've grasped Multiversion Concurrency Control, it's hard to use anything else.

2005-08-11 16:27:40
8.   Ken Arneson
They were all baby teeth, but yes, ouch. Poor girl inherited a need for orthodontics from her father.
2005-08-11 16:29:03
9.   Ken Arneson
The RSS feed updates are off at the moment. When I get home from this job that I'm on, I'll turn them back on.
2005-08-11 16:46:23
10.   Jon Ericson
Ah good to know. Thanks.
2005-08-11 18:01:47
11.   Ken Arneson
RSS feeds should be updated now.
2005-08-11 18:57:44
12.   dbt
PostgreSQL is the bomb.

If you're using DBI (right? RIGHT??!!?) it should be easy to convert, if you're interested. If you need any pointers/tips/etc I'd be happy to help. My PG is good, my perl not so much.

2005-08-11 20:47:18
13.   Ken Arneson
I started out using Postgres for Fairpole, out of loyalty. I used to work for Ingres and at UC Berkeley for Mike Stonebreaker, who started the Postgres project.

But even though MySQL hasn't been a professional quality DB in the past, it's getting there. I like and I'm impressed with the direction it's heading, and the speed at which it's traveling. It looks to me like it's gonna win in the long run, so that's why I went with it. I've been on the losing side in far too many database wars in my career.

Postgres has its quirks, too. All aggregrates do full table scans, for example.

The way I've coded it, I can switch between DBs fairly easily; I just have to copy a separate query file for the new database, and adjust any queries that might have different syntax.

Comment status: comments have been closed. Baseball Toaster is now out of business.