> So the Regex engine has to perform a “character belongs to a certain character class” check (plus some additional things) 20,000+19,999+19,998+…+3+2+1 = 199,990,000 times, and that takes a while. 199,990,000 isn't really all that many. I'm a little surprised it didn't just cause a momentary blip in performance. edit: whoops, i guess that's per page load
Stack Overflow Outage Postmortem
11–20 of 335 posts
Re: Stack Overflow Outage Postmortem
#12Could this has been a deliberate/malicious act? Why else would someone post 20,000 consecutive characters of whitespace on a comment line? Also, the "homepage" of StackOverflow does not show any 'comments' - it is just the top questions? Why was the page loading any comments in the first place?
It would be interesting to find out if something like this goes into their automated regression tests. :)
Re: Stack Overflow Outage Postmortem
#13Comparing this to checking the home page, what is the best way to setup a health check for your load balancers?
Re: Stack Overflow Outage Postmortem
#14Is this the sort of thing that https://github.com/google/re2 was made to solve?
Re: Stack Overflow Outage Postmortem
#15> So the Regex engine has to perform a “character belongs to a certain character class” check (plus some additional things) 20,000+19,999+19,998+…+3+2+1 = 199,990,000 times, and that takes a while. 199,990,000 isn't really all that many. I'm a little surprised it didn't just cause a momentary blip in performance. edit: whoops, i guess that's per page load
The result is likely at least 1,000* 199,990,000 at any given point.
Re: Stack Overflow Outage Postmortem
#16Re: Stack Overflow Outage Postmortem
#17Could this has been a deliberate/malicious act? Why else would someone post 20,000 consecutive characters of whitespace on a comment line? Also, the "homepage" of StackOverflow does not show any 'comments' - it is just the top questions? Why was the page loading any comments in the first place?
To clarify the "comment" was not a Stack Overflow comment, but rather a comment in a code block inside a question.
Re: Stack Overflow Outage Postmortem
#18Re: Stack Overflow Outage Postmortem
#19Could this has been a deliberate/malicious act? Why else would someone post 20,000 consecutive characters of whitespace on a comment line? Also, the "homepage" of StackOverflow does not show any 'comments' - it is just the top questions? Why was the page loading any comments in the first place?
Re: Stack Overflow Outage Postmortem
#20> So the Regex engine has to perform a “character belongs to a certain character class” check (plus some additional things) 20,000+19,999+19,998+…+3+2+1 = 199,990,000 times, and that takes a while. 199,990,000 isn't really all that many. I'm a little surprised it didn't just cause a momentary blip in performance. edit: whoops, i guess that's per page load