Error "context deadline exceeded"

419 views
Skip to first unread message

Carlos Alberto Sanchez Perez

unread,
May 18, 2022, 8:05:22 PM5/18/22
to KrakenD Community
Hello everyone, I have the following error "context deadline exceeded" when using krakend, this error had happened to me some time ago and what I did was to increase the timeout from 3000ms to 10000ms, but now it came back, I attach my krakend.json summarized with a single endpoint to see what else it can be, I saw that the Designer page changed. I am using the latest version of Docker

Thank for any help you can give. 
1652917798451-krakend.json

Daniel Lopez

unread,
May 19, 2022, 8:23:51 AM5/19/22
to KrakenD Community, kaya...@gmail.com
This error is returned when the response can't be generated in the expected time (timeout). There are just 2 options here: increase the timeout or invest some time improving the performance of your backend

Carlos Alberto Sanchez Perez

unread,
May 23, 2022, 10:45:20 AM5/23/22
to KrakenD Community, dlo...@krakend.io, Carlos Alberto Sanchez Perez
My backend is fine, if I consume it directly without using krakend the response times do not exceed 1500 ms, and I'm talking about a request that brings an object composed of twelve thousand lines; As I said I stopped using krakend because it was supposed to be working, and I took care of other requirements.

Krakend is a container on the same network as the consul container, and both are in a Docker on a remote server that I use as a development environment.  

Several months ago I configured and used krakend without problems, but now it stopped working because of the mentioned error, as I said it had already happened to me, I raised it from three thousand milliseconds to five thousand, and it worked, now I raise it to ten thousand, and it gives the same error.


Regards! 
webconsole_portainer.png
direct.png
krakend_log.png

Albert Lombarte

unread,
May 23, 2022, 2:32:30 PM5/23/22
to KrakenD Community, kaya...@gmail.com, Daniel Lopez
Hi Carlos,

The context deadline exceeded has very few readings:

1) There is a problem with the backend because it's not able to respond inside the timeout
2) There is a networking error that prevents KrakenD communicating with the backend
3) The response of the server is very complex and you have very little machine resources to parse it and do the manipulations you have set within that time frame

I can only suggest investigating what is causing this problem as we don't have any configuration or further information to give you an opinion. Maybe you can start by seeing if KrakenD can get a simple JSON from the backend and progress from there.

El dia dilluns, 23 de maig de 2022 a les 16:45:20 UTC+2, kaya...@gmail.com va escriure:
Reply all
Reply to author
Forward
0 new messages