It's been so long since I needed to flush my DNS I had to google it to figure out how to do it. That's done, then I shut down my system, restarted my router, and powered up my computer. I still get the 504 error page when trying to go to the TC shops, and the auction house.
I just noticed I wasn't 100% complete in my details above...for the auction house the error comes up when I try to add a listing to the auction house. I can access the auction house, I just cannot list items and I was asked to start listing cheap items again by another player.
I agree Link, but if your DNS cache points torn.com to the wrong ip address for some reason like corrupt data then you try to view a page that doesn't exist on the ip that the DNS cache is pointing to you will get a 50x error from the server you didn't intend to go to. Your browser will recieve the error and display the appropriate error page which lets the user know there was an error.
A server can be configured to display a default error page instead of returning the error code. In this case, I am seeing the server's default error page for a 504 error. It is in the general style of TC, and is a page I have seen a time or 2 before during spikes of lag. Those times didn't warrant a bug report because often simply try again and it would work.
It does not matter how many times I try, I cannot view those pages. Aside from when I am told to try again here in this thread I am not trying anymore because a 504 error normally occurs when the page is stuck in an infinite loop. Re-loading a page that keeps getting stuck in an infinite loop til it errors out just cannot be good for lag and such.
That would be causing your 504 issues - try trashing/trading or putting them in your display case to avoid these issues. If you're still experiencing the issues at a reasonable level of items (say around 5-10,000) please let us know.