502 bad gateway triggered in nginx when elgg caches are flushed

since upgrading to 1.8.16 i have seen that 80% of the time that i flush the caches i see a 502 bad gateway error..
this may not actually be due to the upgrade to 1.8.16 as i have been changing the nginx config from time to time recently.. though i do not know what the cause of the issue here is.
i have used the methods i found on other sites to change the fastcgi buffer sizes and timeouts, to no avail.
if anyone has any tips i'd appreciate them.
thanks

  • I was getting a similar error but with varnish through apache.  What was actually happening was a 500 error with the script ( a freak problem with userpoints which came up) with apache so varnish could not fetch the page from the backend (apache) and presented the error.  You probably know better to check this but I thought I'd mention it just in case.  Good luck.

  • aha! elggcellent! :)
    i had installed varnish and not thoroughly configured it and didn't realise it was still active..
    i stopped the service and now the cache runs through ok again.

  • ah.. bummer.. the 502 is back again.. even though varnish is stopped..
    i continue.

  • aha again.. i had an old version of php-apc installed.. i just upgraded that and now all is well.. for now.