cosmocode / dokuwiki-plugin-sentry

Log DokuWiki errors to sentry
https://www.dokuwiki.org/plugin:sentry
GNU General Public License v2.0
2 stars 0 forks source link

Check for filesize #11

Open micgro42 opened 4 years ago

micgro42 commented 4 years ago

With a conservative but reasonable PHP memory limit and some old plugins, this plugin can cause crashes:

PHP Fatal error:  Allowed memory size of 267386880 bytes exhausted (tried to allocate 199233536 bytes) in /var/www/html/dokuwiki/lib/plugins/sentry/Event.php on line 186, referer: https://example.com/doku.php?id=notes:test_config&do=edit

The line mentioned in the error: https://github.com/cosmocode/dokuwiki-plugin-sentry/blob/07384aeac7cacf834ba27783376a7a1e65184e20/Event.php#L184-L187

splitbrain commented 4 years ago

Hmm... I wonder what it tries to log that's that big. Maybe we can find a way to drop structures that are too large before they reach this step.

ticky commented 4 months ago

confirming this occurs very quickly with the default php memory limit configuration of the official docker image (256M)