Open michaeI-s opened 4 years ago
Ok! The broker exits willingly and tells us what's wrong. The fix is simply to increase a size I will take some time though to try to understand why a bigger size is needed.
Still
time=Wednesday 06 May 13:07:59 2020.051Z | lvl=FATAL | corr=N/A | trans=N/A | from=N/A | srv=N/A | subsrv=N/A | comp=Orion | op=orionldState.cpp[243]:orionldStateDelayedKjFreeEnqueue | msg=Internal Error (the size of orionldState.delayedKjFreeVec needs to be augmented)
as with latest version:
{
"orionld version": "post-v0.2.0",
"orion version": "1.15.0-next",
"uptime": "0 d, 0 h, 0 m, 30 s",
"git_hash": "c38344b87377681a4ef8aea84a9937b7f2319d9b",
"compile_time": "Tue May 5 17:58:03 UTC 2020",
"compiled_by": "root",
"compiled_in": "9e9a6eb98eaa",
"release_date": "Tue May 5 17:58:03 UTC 2020",
"doc": "https://fiware-orion.readthedocs.org/en/master/"
}
At least on my test machine and with my data this error is reproducible when setting the limit
parameter to >=500
:
curl --location --request GET '<ORION-LD-ADDRESS>/ngsi-ld/v1/entities?type=WeatherObserved&limit=500' \
--header 'Accept: application/ld+json' \
--header 'Link: <https://fiware.github.io/data-models/context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"' \
In Orion v2 there is a maximum number of 1000
. So this value might be expected to work here, too. Otherwise an error should be returned indicating that only a maximum value of x
is allowed for 'limit'.
Currently the LD simply does not react anymore after this fatal error has occurred. Of course this must not happen.
Yes, this is most definitely a bug. Orion-LD has a default limit of 1000, just like Orion. I'm pretty sure this is a problem with the buffer size of the rendered output. Easy to fix to simply make it work for such big buffers (allocate a buffer of 1 gigabytes :) ). Not so easy to streamline the calls to malloc and realloc ... I will need to take a look at this asap
Hi,
I'm doing a lot of
POST /entities
requests from a request queue in a Node.js script. After some number of successfully served requests I get a "socket hang up" error in my script. The Orion-LD log reads:It's not actually a crash, because there is no stack trace. After that Orion is not reachable anymore. Its docker container exited.
I'm using the following Oron-LD version:
Kind regards, Michael