Skip to content

GTFS-RT > feeds timestamp max validity #188

Closed

Description

@mmathieum

The GTFS-RT Trip Updates provider downloads the feed to a local file and keep it in memory.

While it does already try to fetch a new one after X minutes, if that fails, it will keep using the last one fetched successfully to compute real-time next departures.
It's even more a problem because start_date & start_time are currently not used to match the trip updates so the old feed data can be applied to current trips

ETS was showing real-time next departures computed with feed from 6 hours ago ⚠️ :
Image


Image

Data within a GTFS Realtime feed should not be older than 90 seconds for Trip Updates and Vehicle Positions and not older than 10 minutes for Service Alerts. For example, even if a producer is continuously refreshing the FeedHeader.timestamp timestamp every 30 seconds, the age of VehiclePositions within that feed should not be older than 90 seconds.
https://gtfs.org/documentation/realtime/realtime-best-practices/#feed-publishing-general-practices

  • Best practices recommends ignoring data older than 90 seconds for TU & VP and 10 minutes for SA, let's use values close to that (maybe double that?).

Activity

  1. self-assigned this
    on Jul 29, 2026
  2. added
    P2
    on Jul 29, 2026
  3. added theissue type on Jul 29, 2026
  4. changed the title [-]GTFS-RT > Trip Updates > cache max validity[/-] [+]GTFS-RT > Trip Updates > local cache max validity[/+] on Jul 29, 2026
  5. mmathieum commented on Jul 29, 2026

    @mmathieum
    MemberAuthor

    The validity can be for the whole feed file or within the feed itself: individual timestamp fields should be checked as well before using them.

    Example: 1 route is still running with recent timestamp but another route service has completed but the feed still contain the old data for this route alongside other routes recent data.

  6. added a commit that references this issue on Jul 29, 2026
  7. changed the title [-]GTFS-RT > Trip Updates > local cache max validity[/-] [+]GTFS-RT > feeds `timestamp` max validity[/+] on Jul 29, 2026
  8. linked a pull request that will close this issueGTFS-RT > feeds `timestamp` max age #189on Jul 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P2

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions