Truncate keys that are too long with a RuntimeWarning

There is a test in contrib.sessions that dies if we just throw an exception