If I enter a code snippet in Stack Overflow, starting with the keyword 'declare' like this (for some TSQL question, etc.):
DECLARE @myVar int
SET @myVar = ...
And then click the Post Your Question button, the page hangs for about 15-30 seconds and then an error page comes up with a picture of a cat that says this isn't my fault, it's Stack Overflow's. This behavior has been consistent.
My work-around is simply to not start the code snippet with 'DECLARE' -- took a while to figure that out though.
EDIT Here are some specific details to help repro:
I had to change 'DECLARE' to 'ECLARE' to below to get this to post.
Although the message is for a connection timeout -- try again later, etc. -- I don't think high traffic / firewall / etc. is the problem, as all I have to do is remove the word DECLARE and it seems to work fine (even in this bug report here)
1) The post I attempted to answer is here: T-SQL String Concatenating multiple rows
2) This is the answer I tried to give:
You could turn this into a function...
DECLARE @PartNumber varchar(6)
DECLARE @ProductCodeCSV as varchar(max)
SET @PartNumber = '111222'
select @ProductCodeCSV = COALESCE(@ProductCodeCSV + ', ', '') + [product_code]
from table
where [part_number] = @PartNumber
select @ProductCodeCSV
3) This is the url for the error page: T-SQL String Concatenating multiple rows
4) doesn't seem to matter if it's a code block or not -- will not submit
5) Error from page source:
- title: The connection was reset
- short desc: The connection to the server was reset while the page was loading.
- long desc:
- The site could be temporarily unavailable or too busy. Try again in a few moments.
- If you are unable to load any pages, check your computer's network connection.
- If your computer or network is protected by a firewall or proxy, make sure that Firefox is permitted to access the Web.
DECLARE
with a minimum of 4 spaces, and it will work every time.