I am getting a 502 when I try to access CiviCRM from my site. Is the server down? What does this mean and how can it be corrected?
-
Might be worth stating what sort of hosting you have. Eg we have lots of sites hosted on Linodes and have no such issues. We have one trial set up on Pantheon and we do see 502 errors on that system.– petednz - fuzion ♦Commented Jul 23, 2015 at 9:33
-
Also precise in what context do you get those error. Is it for every pages or some specific pages / workflow ?– samuelsovCommented Jul 23, 2015 at 15:56
2 Answers
This error indicates that the web server is trying to connect to another service in order to respond to your request but is unable to. A common scenario is web server software such as nginx, which does not incorporate a PHP interpreter, contacting a service such as php-fpm (typically running on the same server) in order to process PHP.
php-fpm might be unavailable because it is currently handling too many requests and has no free processes to handle your request. Or it is configured with too low a limit on the number of processes.
Alternatively if you access the web via a proxy server, the error might indicate that the proxy server is unable to contact the server where your site is hosted.
Does this error only occur on CiviCRM pages, can you access the rest of your site?
If you don't manage or have access to the server yourself, then best to contact your hosting provider.
This is a common problem with CiviCRM on Pantheon and hasn't entirely been solved, but it has been mitigated.
If you follow the instructions and add the patch described here, then there is about a 50% chance it will solve your problem.
(In essence it simply requires that you apply this patch.)