Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
#3114122: ExceptionLoggingSubscriber should log 403 access denied reason improved the logged message on 403/access denied exceptions. However, it logs backtrace string which can be quite long and could fill up the database if these errors happen quite often.
Proposed resolution
Since the backtrace string is not displayed in the user interface (admin/reports/dblog
), we should be able to remove it and save some space in the database.
Remaining tasks
User interface changes
None.
API changes
Data model changes
Release notes snippet
Comment | File | Size | Author |
---|---|---|---|
#2 | 3167390-2.patch | 756 bytes | mbovan |
Comments
Comment #2
mbovan CreditAttribution: mbovan at MD Systems GmbH commentedPatch that removes
@backtrace_string
array element before logging the exception.Comment #3
BerdirNot sure if we need an explicit test for this, but combined with some weird access denied handling that resulted in nested access denied exceptions in our project, this logged 2000+ lines of backtrace for every access denied that almost filled our database disk.
The other option would be to keep and show the backtrace, but I think that would be a bigger change and doesn't really seem necessary.
Comment #6
catchhmm I don't think this needs test coverage, it's a scalability issue but not really a functional bug as such.
Committed 0870e19 and pushed to 9.1.x. Thanks! Also cherry-picked to 9.0.x and 8.9.x