Skip to content

getAnimeStatistics times out frequently #269

@YoshiWalsh

Description

@YoshiWalsh

Over the span of 9 minutes, I made 83 requests to GET /anime/:id/statistics. Of these, 7 failed with "408 Request Timeout" errors.

Within the same time span I made 83 requests to GET /anime/:id and they all succeeded. So this issue seems to affect statistics specifically.

An example error response body is

{
    "status": 408,
    "type": "TimeoutException",
    "message": "Request to MyAnimeList.net timed out (10 seconds)",
    "error": "Idle timeout reached for \"https:\/\/myanimelist.net\/anime\/579\/jikan\/stats\"."
}

A request a few minutes later for this same anime took 2 seconds to complete successfully.

A few extra notes:

  • 408 Request Timeout is a 4xx error, which means it indicates the fault lies with the client. Because the issue here is happening on Jikan's end, Jikan should return a 5xx error. Typically 504 Gateway Timeout is returned when an upstream server fails to respond in a timely manner.
  • The error response mentions a 10 second timeout, but the error seems to consistently happen after 60-63 seconds or 120-123 seconds. (Of my 7 failed requests, 2 took between 120-123 seconds, the other 5 took between 60-63 seconds)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions