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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

danielnolde’s picture

Find simple function_exists patch attached.

geek-merlin’s picture

I can confirm this error in my errorlog.
No path exceptions here, no varnish.

I will test this as time allows.

geek-merlin’s picture

Issue summary: View changes
Status: Active » Reviewed & tested by the community
FileSize
822 bytes

Re-rolled that patch against module path & tested it applies and fixes the issue.

geek-merlin’s picture

Status: Reviewed & tested by the community » Needs review
FileSize
951 bytes

Nope. 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.)

mojzis’s picture

Title: 503 Guru Meditation error with Varnish and performance.module » Fatal error on cached pages
Version: 7.x-2.0-beta1 » 7.x-2.0
Priority: Normal » Major

We 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 :).

geek-merlin’s picture

Can you test the patch and confirm it fixes the issue?

thinkact’s picture

Status: Needs review » Reviewed & tested by the community

The 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.

  • malc0mn committed 6facc2d on 7.x-2.x authored by axel.rutz
    Issue #2050977 by axel.rutz, danielnolde: Fatal error on cached pages
    
malc0mn’s picture

Status: Reviewed & tested by the community » Fixed

Applied to the 7.x-2.x branch. Thanks for the fix!!

k.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.