Thanks. Fixed that by shortening long urls.
But fixed it better by now doing an url check before storing it. So the page needs to actually exist. And if it does, I believe the urls should be short enough in the first place (as per the format google uses).