Skip to content
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

Found issue with delays #35

Closed
xivk opened this issue Feb 27, 2019 · 8 comments
Closed

Found issue with delays #35

xivk opened this issue Feb 27, 2019 · 8 comments
Labels
bug Something isn't working

Comments

@xivk
Copy link
Contributor

xivk commented Feb 27, 2019

Using the routeplanner when travelling I discovered our API doesn't show the correct delays while iRail and NMBS routeplanners do. Not sure where the bug is to be found.

screenshot_20190227-202750_firefox focus
screenshot_20190227-202823_national

The departure and arrival times match perfectly. I already check the code and this commit may have fixed things: ab0d166

@pietervdvn pietervdvn added this to the 1.0 Open Belgium milestone Mar 5, 2019
@pietervdvn
Copy link
Contributor

I have looked into this, but not yet found why it happens. An unit test and functional test did not indicate something amiss too, although I am able to reproduce it on the live server.

It seems quite doable to reproduce on the live version (2019-03-06):

  • Take the live board of a busy station on irail, e.g. Brussels-Central
  • Some train is always delayed. Take it and plan a route using it.

@pietervdvn
Copy link
Contributor

Still occurs with In storage we trust (Itinero-transit 0.8.2-pre61)

@pietervdvn
Copy link
Contributor

I've noticed that, when this bugs occurs,gtfs:dropOffType "gtfs:NotAvailable" often appears in the upstream data.

Also, if a connection is cancelled, the departure time (with delay included) is still given in the JSON - but the delay is not. This could be a partial explanation, although I'm not sure about that.

@pietervdvn
Copy link
Contributor

Found in the upstream Linked Connections. Notice the BXL-Congres --> Noord AND Centraal-->Noord transfer of what is seemingly the same trip.

9	
@id	"http://irail.be/connections/8813045/20190306/IC3216"
@type	"Connection"
departureStop	"http://irail.be/stations/NMBS/008813045" // Congres
arrivalStop	"http://irail.be/stations/NMBS/008812005" // Noord
departureTime	"2019-03-06T17:25:00.000Z"
arrivalTime	"2019-03-06T17:27:00.000Z"
gtfs:trip	"http://irail.be/vehicle/IC3216/20190306"
gtfs:route	"http://irail.be/vehicle/IC3216"
direction	"Saint-Nicolas"
gtfs:pickupType	"gtfs:NotAvailable"
gtfs:dropOffType	"gtfs:Regular"


208	
@id	"http://irail.be/connections/8813003/20190306/IC3216"
@type	"Connection"
departureStop	"http://irail.be/stations/NMBS/008813003" // centr
arrivalStop	"http://irail.be/stations/NMBS/008812005" // Noord
departureTime	"2019-03-06T17:27:00.000Z"
arrivalTime	"2019-03-06T17:30:00.000Z"
departureDelay	240
arrivalDelay	180
direction	"Saint-Nicolas"
gtfs:trip	"http://irail.be/vehicle/IC3216/20190306"
gtfs:route	"http://irail.be/vehicle/IC3216"


562	
@id	"http://irail.be/connections/8812005/20190306/IC3216"
@type	"Connection"
departureStop	"http://irail.be/stations/NMBS/008812005"// Noord
arrivalStop	"http://irail.be/stations/NMBS/008812021"  // Bockstael 
departureTime	"2019-03-06T17:32:00.000Z"
arrivalTime	"2019-03-06T17:37:00.000Z"
gtfs:trip	"http://irail.be/vehicle/IC3216/20190306"
gtfs:route	"http://irail.be/vehicle/IC3216"
direction	"Saint-Nicolas"
gtfs:pickupType	"gtfs:Regular"
gtfs:dropOffType	"gtfs:NotAvailable"
departureDelay	180
arrivalDelay	120

@pietervdvn
Copy link
Contributor

Deployed the version which drops cancelled trains upon loading - bug is still there.

@pietervdvn
Copy link
Contributor

I dissected a live transitdb, the delay data is missing in there too

@pietervdvn pietervdvn added the bug Something isn't working label Mar 25, 2019
@pietervdvn
Copy link
Contributor

I wrote a small test where I fetched a 'connections.json', loaded it and counted the number of delayed entries. No delayed entries were missing in the output.

I suspect that this is a caching issue. It takes a few minutes for the delays to get from SNCB to irail, it takes another few minutes to get them loaded and a few extra minutes are added by the time that we get them in our server - causing the delays to be missing. As the most important delays are 'right now', this is quite inconvenient, so some more discussion is needed on this.

@pietervdvn
Copy link
Contributor

The refreshing time has been lowered to 5 seconds, caching should avoid the biggest load. This should fix most of it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants