You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In our automated testing, we are seeing intermittent failures due to the HttpVersionParse.Parse() throwing a RegexMatchTimeoutException.
{
"ClassName":"System.Text.RegularExpressions.RegexMatchTimeoutException",
"Message":"The Regex engine has timed out while trying to match a pattern to an input string. This can occur for many reasons, including very large inputs or excessive backtracking caused by nested quantifiers, back-references and other factors.",
"Data":null,
"InnerException":null,
"HelpURL":null,
"StackTraceString":"
at System.Text.RegularExpressions.RegexRunner.g__ThrowRegexTimeout|25_0()
at Regex354_TryMatchAtCurrentPosition(RegexRunner, ReadOnlySpan`1)
at Regex354_Scan(RegexRunner, ReadOnlySpan`1)
at System.Text.RegularExpressions.Regex.RunSingleMatch(RegexRunnerMode mode, Int32 prevlen, String input, Int32 beginning, Int32 length, Int32 startat)
at System.Text.RegularExpressions.Regex.Match(String input)
at WireMock.Util.HttpVersionParser.Parse(String protocol)
at WireMock.Owin.Mappers.OwinRequestMapper.MapAsync(HttpRequest request, IWireMockMiddlewareOptions options)
at WireMock.Owin.WireMockMiddleware.InvokeInternalAsync(HttpContext ctx)
at WireMock.Owin.GlobalExceptionMiddleware.InvokeInternalAsync(HttpContext ctx)",
"RemoteStackTraceString":null,
"RemoteStackIndex":0,
"ExceptionMethod":null,
"HResult":-2146233083,
"Source":"System.Text.RegularExpressions",
"WatsonBuckets":null,
"regexInput":"HTTP/1.1",
"regexPattern":"HTTP/(\\d+(\\.\\d+)?(?!\\.))",
"timeoutTicks":1000000
}
Expected behavior:
We expect the regex to parse all the time with no exceptions
Test to reproduce
We don't have reliable reproduceable test scenarios as it's intermittent. 1-2 failures every 1000 runs.
Other related info
Our suspicion is that the 100ms timeout is too short and test systems under load might not be able to parse fast enough, throwing the exception.
Can we make this default value higher (500ms) or make it configurable so we can set it to a higher value?
The text was updated successfully, but these errors were encountered:
Describe the bug
In our automated testing, we are seeing intermittent failures due to the
HttpVersionParse.Parse()
throwing aRegexMatchTimeoutException
.Expected behavior:
We expect the regex to parse all the time with no exceptions
Test to reproduce
We don't have reliable reproduceable test scenarios as it's intermittent. 1-2 failures every 1000 runs.
Other related info
Our suspicion is that the 100ms timeout is too short and test systems under load might not be able to parse fast enough, throwing the exception.
Can we make this default value higher (500ms) or make it configurable so we can set it to a higher value?
The text was updated successfully, but these errors were encountered: