My client is a bit perturbed as there is no code to deal with calls to the api.tfl.co.uk hanging, as they always return very quickly and will never hang.
Do I need to change my code or is this hanging an unwanted behaviour?
We have had a new incident this afternoon with our API Management system. We’re working with the supplier to investigate the issue and we’ll update you as soon as we can.
If this helps I can see the problem in Cloudwatch…
server 1: starts at 2021-09-09T13:36:07.153+01:00 still going on at 2021-09-09T15:35:34.928+01:00
server 2: starts at 2021-09-09T14:28:30.877+01:00 still happing at 2021-09-09T15:31:21.643+01:00
I’ve put better error control on “Server 3” but that just means I’ve seen
Exception: Operation timed out after 10001 milliseconds with 0 bytes received in /var/www/html/xxx/TfLStatus/UrlGetContentsMemcached.php:53\nStack trace:\n#0 /var/www/html/xxx/TfLStatus/UrlGetContentsMemcached.php(23): xxx\\TfLStatus\\UrlGetContentsMemcached->urlGetContents('https://api.tfl...')\n#1 /var/www/html/xxx/TfLStatus/TflStatusSimple.php(49): xxx\\TfLStatus\\UrlGetContentsMemcached->cacheTFLcall('https://api.tfl...')\n#2 /var/www/html/xxx/TfLStatus/TflStatusSimple.php(29): xxx\\TfLStatus\\TflStatusSimple->getRainbowBoardFromTfL('https://api.tfl...')\n#3 /var/www/html/xxx/TfLStatus/TflStatusSimple.php(20): xxx\\TfLStatus\\TflStatusSimple->getSimpleArray('https://api.tfl...')\n#4 /var/www/html/view/HtmlView/TflHelper.php(14): xx\\TfLStatus\\TflStatusSimple->getLineStatusArray()\n#5 /var/www/html/view/HtmlView/CreateStaticView.php(90): view\\HtmlView\\TflHelper::generateTflForStation('PBL',
I’m still getting the
Exception: Operation timed out after 10001 milliseconds with 0 bytes received in /var/www/html/xxx/TfLStatus/UrlGetContentsMemcached.php:53 at 15:56
@briantist, I store a local copy of the json daily.
Is it possible to query api (php) and after n seconds timeout, revert to local json for camera data?
Did you have anything specific in mind to counter api problems?
Hi @OldManBrook - it’s still with the supplier. It’s a PaaS cloud solution, so we’re a bit hamstrung on what we can do ourselves. It’s escalated as a critical incident with the supplier.
Thanks. I know how hard these things are to sort when the world is watching you every move, millisecond by millisecond .
I’m pleased to say the last error I had was at 17:44:02.546+01:00 and the last actual timeout was at 16:42:10.589+01:00
Fingers crossed my code changes (200ms timeout on the curl requests, transfer of https error codes into json objects) will stop this breaking everything else should this happen again.
We’re still looking into the root cause of these API Management issues with the supplier. Unfortunately there is little we can do about them until the supplier can fix or advise us how to fix.
We seem to be getting them some mornings around 7:30-8:30 in the morning.