Troubleshooting 5xx Server Error Responses
The following content describes common causes for some HTTP 5xx server error response codes and possible solutions.
502 Bad Gateway, 503 Service Unavailable, 504 Gateway Timeout
- Load Balancer is Serving Traffic to Nodes During Scale-In Events
- MarkLogic Capacity Units (MCUs) are Under Provisioned
Load Balancer is Serving Traffic to Nodes During Scale-In Events
A 502, 503, or 504 error can be observed during scale-in events where a load balancer serves traffic to one or more nodes in the MarkLogic cluster that are in the process of terminating. In your client error logs, the errors can be observed during this termination process before the node is fully removed from the MarkLogic cluster. You should no longer observe the errors after the nodes stabilize, meaning the nodes are fully terminated and the load balancer is serving traffic to healthy nodes.
MarkLogic Capacity Units (MCUs) are Under Provisioned
If your DHS runs at burst capacity for a prolonged period of time, you might exhaust your accumulated MCUs. You will be restricted to running at baseline capacity, such as 32 or 64 MCUs, if your service no longer has any MCUs available for scaling. You might overwhelm your baseline capacity if you continue to run the same heavy workload at baseline capacity. A 502, 503, or 504 error can be observed in your client error logs if your baseline capacity does not have enough capacity for your workload and your service does not have enough MCUs to scale.
- Increase your existing DHS capacity within your selected range. For example, if you created a Standard service with a range of 64-112, you can increase the capacity from 64 to 112.
- Create a new DHS in a higher MCU range, and deploy your data to the new DHS. For example, if you created a Standard service with a range of 64-112, you can create a new Standard service with a higher range, such as 256-496.