When accessing a page via varnish (configured only to cache static files like js/css and image) on a site with performance.module enabled and some path exceptions configured, anonymous visitors get a 503 guru meditation error from varnish. In a php error log, the following error could be identified as cause:
Fatal error: Call to undefined function drupal_match_path() in /home/wave/TFT/releases/intranet_bip_git/www/sites/all/modules/contrib/performance/performance.module on line 269
Don't ask me for the reason of that error and why drupal_match_path() is not defined anymore during the shutdown hook, but a simple function_exists check is a quick workaround, see attached patch.
Comment | File | Size | Author |
---|---|---|---|
#4 | performance-2050977-4.patch | 951 bytes | geek-merlin |
#3 | performance-2050977-3.patch | 822 bytes | geek-merlin |
Comments
Comment #1
danielnolde CreditAttribution: danielnolde commentedFind simple function_exists patch attached.
Comment #2
geek-merlinI can confirm this error in my errorlog.
No path exceptions here, no varnish.
I will test this as time allows.
Comment #3
geek-merlinRe-rolled that patch against module path & tested it applies and fixes the issue.
Comment #4
geek-merlinNope. That patch just trades said error for a PDOexception in watchdog.
This patch does NOT do performance logging if drupal_match_path is not defined, which is likely on requests that don't do a full bootstrap.
(THe other patch tried to log in that cases.)
Comment #5
mojzis CreditAttribution: mojzis commentedWe just spent a lovely afternoon trying to figure out what is going on, why are our apache error logs flooded with errors.
All cached pages (admin/config/development/performance -> cache for anonymous) happen to throw this error.
Fatal error: Call to undefined function drupal_match_path() in /home/wave/TFT/releases/intranet_bip_git/www/sites/all/modules/contrib/performance/performance.module on line 269
so the question is whether there is a way to tell that a request goes through the cache ?
Thanks :).
Comment #6
geek-merlinCan you test the patch and confirm it fixes the issue?
Comment #7
thinkact CreditAttribution: thinkact commentedThe patch #4 works.
I agree that cached pages need not have performance logged as studying on the performance on non-cached pages is more realistic.
Comment #9
malc0mn CreditAttribution: malc0mn commentedApplied to the 7.x-2.x branch. Thanks for the fix!!
k.