MT Background Processing Limitations

Sep 7

MT Background Processing Limitations

One of the cool new things in Movable Type 3.x is that it forks processes to do stuff in the background. For instance, if you save an entry, you don’t have to wait for it to rebuild. MT runs the rebuild process in the background, and the entry quietly rebuilds within 30 seconds or so of you saving the entry and returning to the menu screen.

However, this morning I was mass deleting 60+ comment spams (another great new feature: search for comments by IP). MT 3.x is automatically rebuilds the entry when you delete a comment (great improvement, BTW), so 60+ entries were rebuilding at the same time in the background.

Now, we all know that MT isn’t terribly efficient with the database calls (doesn’t have to be when it’s write-one, read-many), so the database must have been getting hammered while these entries were rebuilding.

I made a change to another entry, tried to save it, and got this:

Got an error: Bad ObjectDriver config: Connection error: User [removed]@localhost has already more than ‘max_user_connections’ active connections

A small price to pay for background processing, but they probably should have trapped the error. Now I’m left wondering how many of my entries actually rebuilt, and how many died in process due to this error. Since they were being rebuilt in the background and thus wouldn’t display an errror, I may never know.

The solution: Rebuild All Files. My hosting company must hate me.


Comments

by Phil Ringnalda,   September 7, 2004 4:37 PM  

A small price, but more than you should have to pay: it's just doing the fork() in the wrong place. 3.1 forked in rebuildentry, so if you just call that once, life's good and you get control right back, but if you have an array of 60 entries, and you run through them calling rebuildentry, then you spawn off 60 processes, and are lucky to have the database limits to clobber most of them, before they take your whole server down. Bring on 3.12! (BTW, 3.11 doesn't fork() on rebuild_entry, so an upgrade ought to cure that problem, even though it will also "cure" the way MT returns so quickly when you save an entry.)



Add Comment


Want to advertise on this site? Contact FM.
Laser Toner Cartridges UK laser toner, toner cartridges, hp toner, lexmark toner, samsung toner, canon, toner, epson toner, oki toner, kyocera toner, xerox toner, remanufactured toner, compatible toner
Direct TV Deals Free 4 room direct tv deals. no equipment to buy. free fast professional direct tv installation. this is the best direct tv deal available anywhere.
SEO Article Learn from the experts with our SEO article.
rope light Shopping with birddog distributing, inc., gives you access to the lowest prices, the best customer service and the quickest delivery times possible.
Laptop AC Adapter We offer genuine factory direct replacement AC adapters.
Direct TV Best satellite TV deals.
Direct TV Deals Direct TV programming deals are varied and include packages containing from 50 channels up to over 250 channels.
8mm film to DVD Retain family memories with the only frame by frame digital restoration service in the United States for your 8mm film to DVD today
Rubber Stamp Shop for custom self-inking stamps, hand stamps, address stamps, label stamps, check endorsement stamps, check deposit stamps, date stamps, pre inks, pocket stamps, ink and much more!