IPv6 causing Internal Server Errors

(Michael Brown) #1

We’ve briefly turned on IPv6 connectivity here, but it’s exposed a bug in the code that causes ‘500 Internal Server Errors’ when you visit a topic.

If you’re been browsing the site recently with IPv6 and received failures when going into topics, that’s probably the cause.

We’ll be turning it off temporarily until we get the problem sorted.

In case you’re curious:

Postgres complains:

2013-04-17 03:03:25 UTC ERROR:  value "42540578219911037928742559588703898005" is out of range for type bigint
2013-04-17 03:03:25 UTC STATEMENT:  INSERT INTO "views" ("ip", "parent_id", "parent_type", "user_id", "viewed_at") VALUES ($1, $2, $3, $4, $5)


>>> int(hexlify(socket.inet_pton(socket.AF_INET6, '2001:470:b0e2:0:198:c531:dbe1:8995')), 16)

(ComputerDruid) #2

I noticed this today when I tried to set up a development server. I had to hack around it by tunneling an IPv4 port through ssh.

It looks like postgres supports an ipv6 address type natively, although I don’t know how we would go about using it in the db: PostgreSQL: Documentation: 8.2: Network Address Types

(Sam Saffron) #3

yeah, we know what to do, it just involves a bit pile of changes.

(ComputerDruid) #4

I believe this will fix the issue. Any code review on this would be greatly appreciated

(ComputerDruid) #5

@supermathie: Now that this is merged, is there a chance that IPv6 will be re-enabled? As far as I know there aren’t any other issues exposed by IPv6, although I admit I haven’t tested all functionality over IPv6 yet.

(Michael Brown) #6

Oh, you are preaching to the converted :grin:

Yes, we plan to do a bit of IPv6 testing and then turn it back on.

(Sam Saffron) #7

I wonder … where are we on this puppy?

(Michael Brown) #8

IPv6 is turned back on (a while ago)! This message posted from an IPv6 connection, even.

Unfortunately, trying to browse Meta via IPv6-only fails due to our CDN not supporting IPv6.

(rant: personally I think it’s almost criminal to call yourself a CDN and not support IPv6 but hey that’s just my opinion)

(Michael Brown) #9

This topic was automatically closed after 24 hours. New replies are no longer allowed.