Thoughts and Ramblings

General things I find of interest.

Thrashing Server

Well, last Sunday, we released a new version of Perian. It didn’t occur to me at the the time that this would mean a large number of people would be visiting the site. Anyway, Monday morning I noticed that the web server was very slow, which began my fun. I decided that the best course of action was to increase the number of servers. The system had CPU to spare as well as memory, so this is the natural choice. So, I increased the number, restarted the web server, and it helped, some. So, I increased the number further, reloaded the web server, and watched top for cpu and memory usage. I kept increasing the number, until I realized that reloading the web server didn’t actually reload this part of the configuration and I needed to restart the web server. So, I restarted the web server, and watched top in horror as the server ran out of memory and started swapping. I quickly issued a /etc/init.d/apache2 stop command, but the command never completed. I quickly scrambled to see if there was any other shells I could gain to the server. Everything was running horribly slow because the server was thrashing. It became clear to me about 10 minutes later that the kill process was not keeping up with the new apache processes being created; so I must do something to stop the new apache processes first. So, I had the sense to issue a iptables -A INPUT -p tcp dport 80 -j DROP. This firewalled off the web server from the entire world. Then, over the course of the next minute, the server starts becoming responsive again. Finally, I managed to actually kill the web server, set it’s child count to a more reasonable value, and start it back up again. Then, a quick flush of the firewall rules, and it was working again. If I didn’t have the sense to run this, I likely would have had to resort to a reboot of the server into single user mode; a prospect to which I was not very amenable. So, one of these days I’ll reconfigure the thing to use the threaded version of the web server; however, php doesn’t work there, so I guess I’ll have to use some sort of workaround.


Firewall Ban Activated

Well, shortly after my last post, the Chinese spammer struck again. I just blocked a bit over half a million addresses in China in response. I have no tolerance for such things, I don’t trust anyone in China to care enough to do anything about this guy; so blocking is really the best recourse.


Turn the Firewall Around

I’ve noticed that a large proportion of spam showing up on my sites is coming from China, trying to promote chinese businesses. One annoying individual in particular likes to spam trac, by creating a username of “add” and spamming after logging in. In the past, I tried deleting the spam, removing the account, and then banning the IP address, but this moron just does it again from a new IP address. I’ve found that by editing the password file, and adding a “*LW*” to the hashed password, I can lock him out from future spamming, but this method is only effective till he uses a different username.


Decline of Local Bookstores

Today I went to a local Barnes & Noble to purchase some books. The books aren’t the current best sellers, but they are quite well known, so the store should have had them. Since they were science and religious in nature, I looked in both sections. After 30 minutes, I found numerous books on the same topics, but none of the ones I wanted. This was frustrating to the point that I wished for a card catalog like a library just so I could figure out where the store would put them. Eventually I gave up, walked out and decided to just look online.


Wall•E

Some friends and I went to see Wall•E last night. It is definitely the funniest movie I have seen all year and I’m glad to see that Pixar hasn’t gone too far downhill. I was afraid that Disney would attempt to destroy them, but it seems they haven’t succeeded quite yet.

On the other hand, the movie did have a lot of technical point which were severely wrong.

  • One scene had a space ship traveling through a large sphere of satellites to get away from Earth. You cannot have a sphere of satellites in orbit and expect them to stay up for a year, much less 700. They’d crash into each other and change their orbits.
  • Even with satellites in the same orbit, you cannot have them sitting within a meter of each other for the same reason.
  • Rotating a ship in space doesn’t change the gravity experienced on the ship (to get any gravity in the first place requires creating it yourself, but that’s another issue).
  • The movie shows a spaceship dumping a large chunk of trash into space. While this make be a convenient means of waste disposal, the sheer mass of disposal shown is completely impractical for a space ship of that size. It would have lost it’s entire mass to trash within a year and it was supposed to be there for 700. What happened to conservation of mass?
  • And the biggest issue: I seriously doubt that humans have the ability to trash the planet to the extent shown in the film, even if we wanted to. We just don’t have that kind of an impact on our environment. Besides, even if we did, rather than sending the entire population to space while cleaning up the planet, wouldn’t it be more practical and cheaper to just send up the trash for disposal?

There are a few more issues; but if you ignore the distortion of science and reason, the movie is quite enjoyable. The sad thing is, the movie could have adhered to both science and reason without destroying the major plot points.