Web Server Error API

Hi guys,
I used nginx(compile from source) load balancing for 2 graylog nodes.
Here is my nginx config file:

server {
	listen 80;
	server_name xxx;

    location / {
	proxy_set_header    Host $http_host;
	proxy_set_header    X-Forwarded-Host $host;
	proxy_set_header    X-Forwarded-Server $host;
	proxy_set_header    X-Forwarded-For $proxy_add_x_forwarded_for;
	proxy_set_header    X-Graylog-Server-URL http://xxx/api/;
    proxy_pass  http://graylog-web-cluster;
}
}

upstream graylog-web-cluster {
	server graylog1.xxx:9000 max_fails=3 fail_timeout=30s;
	server graylog2.xxx:9000 max_fails=3 fail_timeout=30s;
}

But my graylog web server is not stability, sometime up, sometime down.
And It’s error is "Error: cannot GET http://xxx/api/ (520)"
How can I fix it?
Thanks,

@jochen help me, pls.

Hej

you might want to look here in this posting or in the documentation to find how this works.

A first view did not reveal any issues with the configuration, you need to debug and find in the log files why this happens.

If you need specific SLA for your Graylog installation, consider buying professional support. Other than that the community support is being performed on a best-effort basis and it’s not a personal support service.