Get all your news in one place.
100’s of premium titles.
One app.
Start reading
The Guardian - UK
The Guardian - UK
Technology
Charles Arthur

Facebook and the integer overflow.. and the problem 31 years away

While most of Britain is (sensibly) concerned with physical overflows, such as the town of Upton-upon-Severn looking more like Severn-upon-Upton, people are still wondering about the flood defences of Facebook.

To be precise, how big it can get before it starts to break its database.

One "group" (among the hundreds of thousands there) on the social networking site is called "If this group reaches 4,294,967,296 it might cause an integer overflow."

It's very much a geek joke - it's assuming that the field in the database for the number of members for the group is set at (quick mental calculation) 16-bit unsigned (check with calculator) 32-bit unsigned.

But it does raise the real question: has Facebook planned for its possible expansion? How many members could it hold? (Has it allowed for 4+ billion members?) Could it reset the size of those fields without causing a huge problem? A site that I've done work with has some forums, and inevitably when the admin went on holiday, the forums hit the magic number that meant no new postings could be added. This caused just a bit of consternation, since the forums were busy anyway.

Of course, that pales in comparison to the Year 2038 bug, which will visit pretty much all Unix-based and C-using operating systems (because they calculate time on a signed 32-bit integer, starting from 1904). My own suspicion is that it'll make the Y2K problems look like a cakewalk - unless something very, very radical is done. Look, after all, at how much more the internet, and hence Unix, is woven into our daily lives. So Facebook's problem might raise a laugh. But will we still be laughing in December 2037? (Assuming we're still using computers..)

Sign up to read this article
Read news from 100’s of titles, curated specifically for you.
Already a member? Sign in here
Related Stories
Top stories on inkl right now
One subscription that gives you access to news from hundreds of sites
Already a member? Sign in here
Our Picks
Fourteen days free
Download the app
One app. One membership.
100+ trusted global sources.