Skip to content

Notices API returns 504 errors intermittently when limit is set #266

@nathans-lyft

Description

@nathans-lyft

We use the notices API, retrieving 20 per call (the limit so far) and sorting by newest so we can stop requesting when we've covered the notices we have already processed. When requesting https://ubuntu.com/security/notices.json?limit=20&order=newest&offset=0 we frequently see HTTP 504 gateway timeout errors, and when we do, these continue for many hours before resolving without a change on our side. This cycle of requests failing and working again has repeated over the past few weeks and we haven't yet identified a pattern to suggest why this intermittency exists. These errors do not happen when requesting the bare URL https://ubuntu.com/security/notices.json which returns the first 10 notices but not in the order we want. Reducing the limit to 10 does work, but only on the first request and only if the order is not set. Specifying a limit of 10 but requesting an offset also results in 504s.

To clarify:
No limit set, no order, no offset: works
Limit 10, no order, offset 0: works
Limit higher than 10: 504
Order set to newest: 504
Offset anything other than 0: 504

This appears related to previous issue 178, but as it appears connected to any results other than the first ten, no matter how they are retrieved, it may be a different root cause.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions