0

Whenever I clear cache from the admin panel (or hit the url directly) I receive an nginx error (but nothing specific is being logged).

There are no PHP error logs being created for this either.

I've narrowed it down to the /includes/menu.inc _menu_router_build function.

The strange thing is, that if I add an echo to line 2365:

// Apply inheritance rules.
foreach ($menu as $path => $v) {
   echo $path; // echo added
   ....
}

The cache clears, it doesn't error out, BUT it doesn't seem to complete because all the values are echoed but I'm never redirected. Completely lost on this one.

1
  • how much memory are you giving to php/apache?
    – saadlulu
    May 14 '13 at 7:03
2

We had a similar issue and traced it to the nginx fastcgi_read_timeout option. Because the code to clear the cache doesn't send any output to the browser until it finishes, nginx doesn't receive anything from PHP for 60 seconds. At this point, the default fastcgi_read_timeout is reached, so nginx aborts the request.

When you added the echo $path, you forced PHP to output something, which meant that nginx had something to read, so it didn't reach the timeout.

You should try increasing the fastcgi_read_timeout to, say, 120s and see if that helps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.