MS Graph API Error 504: Timeout when send large data (Java Sdk 5.80.0)

18 Views Asked by At

I am using MS GRAPH API (With Java SDK 5.80.0). I am using PATCH Range API: Update Range. But I don't know its limit body size or another limit (row, column). When I try to patch a huge range (about 1200 rows and 60 columns) -> Request bodysize~ 1Mb.

Sometime it work well, sometime MS return 504: Unknown Error.

Sometimes 504: Timeout.

I try to add Session, but no result.

I logged the error time, and every time the APIs need more than 30s, I got Error.

So, I want to know it limit (ex, 50000 cells) or change it timeout (30s -> 200s).

This is my Client:

        Properties properties = new Properties();
        properties.load(new FileInputStream("src/main/resources/oAuth.properties"));

        AccessToken accessToken = new AccessToken(properties.getProperty("accessToken"), null);

        TokenCredentialAuthProvider provider = new TokenCredentialAuthProvider(tokenRequestContext -> Mono.just(accessToken));

        var builder = HttpClients.createDefault(provider).newBuilder();

        var httpClient = builder.build();

        return GraphServiceClient
                .builder()
                .httpClient(httpClient)
                .buildClient();

I need a solution, with API headers, not in SDK, is ok.

0

There are 0 best solutions below