Optimize Your Caching Scheme to Eliminate “Too many links” Errors on Linux

Say you have an application running on a Linux server using the ext2 or ext3 file systems. You set up a caching scheme in your application to store files like so:

/cache/stamps/1/main_content.cache
/cache/stamps/1/comments.cache

/cache/stamps/2/main_content.cache
/cache/stamps/2/comments.cache

/cache/stamps/3/main_content.cache
/cache/stamps/3/comments.cache
...

Eventually, you’re going to run into a problem: Your caching will stop working since your application won’t be able to write to the “stamps” directory any more. Instead, you’ll get an error message like this:

Couldn't create cache directory: /stamps/41134/main_content (Too many links - /var/www/your-app/tmp/cache/stamps/41134)

At that point, you’ll try to search for “too many links”, and probably you won’t find much information that is actually comprehensible to normal human beings. Fortunately, it really is quite simple to repair once you understand what’s going on.

(more…)

How to Save that Cell Phone, MP3 Player, or Other Gizmo that you Just Dropped into the Water

Did I break it?So, you’re merrily using your cell phone, MP3 player, or other electronic gizmo when it just happens to slip out of your hand and fall into the bathtub, ocean, river, a bowl of soup, etc.

After panicking and maybe swearing a bit, what the heck are you supposed to do?

With a little ingenuity, the proper tools, and a dash of bravery, you CAN bring your device back to life. Unless it’s a digital camera – in that case, you’re probably screwed. Sorry.

The first step is the most important: REMOVE THE BATTERY IMMEDIATELY!!!

(more…)

Satellite Fender Bender: I don’t think so

You may have heard of the recent fender bender in outer space between an Iridium satellite and a “defunct” Russian satellite:

Satellite collision could pose space threat – Crash creates debris; slight risk to space station, minor impact on Iridium

MSNBC.com
12 Feb 2009

Russian and U.S. experts say the first-ever collision between two satellites has created clouds of debris that could threaten other unmanned spacecraft.

Russia’s Mission Control spokesman Valery Lyndin says there is little risk to the international space station with three crew members aboard.

Lyndin said Thursday that officials would monitor the debris from Tuesday’s collision to make sure no fragments get near the station. He said the station’s orbit was adjusted in the past to avoid debris.

Other Russian and U.S. officials warn that satellites in nearby orbits could be damaged.

The smashup occured over Siberia when a derelict Russian military communications satellite crossed paths with a U.S. Iridium satellite.

The two big communications satellites collided in the first-ever crash of two intact spacecraft in orbit, shooting out a pair of massive debris clouds and posing a slight risk to the international space station.

NASA said it will take weeks to determine the full magnitude of the crash, which occurred nearly 500 miles (800 kilometers) over Siberia on Tuesday.

Okay, so let’s think about this, because I don’t buy it. Why not?

(more…)

A Tale of Two Techies: Life, Death, and Resurrection

StethoscopeMost people are not technically inclined, at least not to the extent that they know how to repair their own computers. When something goes wrong, the average Joe or Josephine must rely on “techies” to fix things up.

Some people simply call the company from which they purchased their computer. That’s easy enough, although I could tell you horror stories about the outsourced tech support many companies provide. Another option is to visit one’s local “computer shop”. Usually it’s the kind of place that’s family owned and operated. They usually sell components, build their own machines to sell, and service anything that’s brought in to them. They’re everywhere.

The problem is – as if the Big Name Manufacturer tech support wasn’t bad enough – many of these Mom and Pop places really have no idea what they’re doing. Or, they just want to rip you off.

Here’s a little story to illustrate my point.

(more…)

How to Determine the Master Browser in a Windows Workgroup

Home NetworkHere’s a little problem that drove me crazy: How do you determine the Master Browser in a Windows Workgroup?

First of all, lemme explain a bit about how a workgroup works. When you have a LAN set up running Windows machines, each machine can see all the others in Network Neighborhood (or just “Network” in Vista). If you want to see the files on another machine, you just go to Network Neighborhood, click, et voila!

The other method you can use is to open Windows Explorer (keyboard shortcut: Win-E) and in the location/address bar, type:

\\COMPUTER-NAME

So, if you want to go to the computer called BALTHAZAR, you’d type:

\\BALTHAZAR

And hit enter. This is handy to know if Network Neighborhood is not working. And a grumpy Network Neighborhood is exactly the reason why sometimes, you need to find out which computer is the Master Browser.

(more…)