Skip to content

[DE-55] Retry case of error 503(without 'x-arango-endpoint') #530

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ajw227 opened this issue Dec 3, 2023 · 1 comment
Closed

[DE-55] Retry case of error 503(without 'x-arango-endpoint') #530

ajw227 opened this issue Dec 3, 2023 · 1 comment
Assignees

Comments

@ajw227
Copy link

ajw227 commented Dec 3, 2023

Related

arangodb/arangojs#710

Description

When coordinator is start, it reponse 503 error about few seconds.
If you get a 503 error, I think calling a different coordinator will solve it.

  1. error 503. contains 'x-arango-endpoint' header : OK
  2. error 503. except 'x-arango-endpoint' header : Response Error.
com.arangodb.ArangoDBException: Response: 503, Error: 503 - service unavailable due to startup or maintenance mode

Proposal

https://github.com/arangodb/arangodb-java-driver/blob/main/core/src/main/java/com/arangodb/internal/net/Communication.java#L102

                            } else if (errorEntityEx != null) {
                                if(errorEntityEx.getErrorNum() == 503) { //Add this line case of maintenance or startup mode.
                                    handleException(true, errorEntityEx, hostHandle, request, host, reqId, attemptCount, rfuture);
                                } else {
                                    rfuture.completeExceptionally(errorEntityEx);
                                }
                            } else {
@rashtao rashtao self-assigned this Dec 4, 2023
@rashtao rashtao changed the title Retry case of error 503(without 'x-arango-endpoint') [DE-55] Retry case of error 503(without 'x-arango-endpoint') Dec 4, 2023
rashtao added a commit that referenced this issue Dec 19, 2023
@rashtao
Copy link
Collaborator

rashtao commented Dec 20, 2023

@rashtao rashtao closed this as completed Dec 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants