ankane/logstop

Rack::Timeout::RequestTimeoutException

dalezak opened this issue · 5 comments

I've been having some timeout issues, and noticed one error report mentioned logstop.rb in scrub at line 21:

18. msg = msg.to_s.dup
19. 
20. # order filters are applied is important
21. msg.gsub!(URL_PASSWORD_REGEX, FILTERED_URL_STR)
22. msg.gsub!(EMAIL_REGEX, FILTERED_STR)
23. msg.gsub!(CREDIT_CARD_REGEX, FILTERED_STR)
24. msg.gsub!(CREDIT_CARD_REGEX_DELIMITERS, FILTERED_STR)

logstop.rb in scrub at line 21
logstop/formatter.rb in call at line 12
logger.rb in format_message at line 582
logger.rb in add at line 472
active_record/session_store/extension/logger_silencer.rb in add_with_threadsafety at line 38
active_support/logger_thread_safe_level.rb in add at line 53
logger.rb in info at line 525

Have you ran into any issues like this before?

Hey @dalezak, rack-timeout will raise an exception in whatever code it's executing when the time limit is reached. My best guess is the process is in the middle of logging some of the time when a timeout occurs.

Closing due to no response

kwent commented

Running into the same issues, could we use https://blog.saeloun.com/2022/08/09/ruby-introduces-regexp-timeout somehow ?

I don't think it's an issue with Logstop, so not sure that'll help.

kwent commented

Might be good to begin rescue Regexp::TimeoutError, and return msg = 'REDACTED'. Kind of deal.