Wednesday, December 12, 2007

Today I Learned... How to Take Down a Mac

Actually, I learned a few things today, like that I can subscribe to the DeepRockDrive past shows video collection at blip.tv in iTunes and presto, awesome new videos on the iPod!  I also learned that Pearl totally rocks!

But the most interesting one came when I was trying to stress test some PHP code I was writing.  I wrote a javascript function that just posts to the server (also running on my machine) a bunch of times in a loop and then does a get to see what I get back.  This works fine, in general, but I started out with 1000 posts in that loop.  Things got totally crazy.  Of course the machine was locked up during the post cuz it takes a lot of CPU to do a fast loop with async callbacks but even after it was done, nearly every application locked up and I had to do a full system reset to get it back.

Running it a hundred times worked fine later on.  Clearly 1,000 is over some limit and I really don't feel like going further to figure out what that limit is.

So, um, don't do that :)


No comments: