-
Notifications
You must be signed in to change notification settings - Fork 43
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
Running into GatewayResultCode.GW_RES_SINK_OUT_OF_MEMORY when sending a lot of requests #255
Comments
After some more testing I figure out that it runs alright for a while, and then at one point it starts giving me GW_RES_SINK_OUT_OF_MEMORY, even when sending the requests slowly, so it seems that when I send a lot of requests at the same time, the usb stick / sink service(?) get's into a weird state and starts returning those errors. Looks more like a memory leak now? |
Recompiled sink service with DEBUG output in data.c, which didn't bring many new insights (log below).
So I tried to run the c-mesh-api example with some more logging to rule out dbus, and I got something more interesting:
I guess the message is not being received, so it is retrying to send it? |
Hello @vespakoen, Why do you think it is a bug? Downlink packets are queued in the sink before being sent to the network and once the buffers are full, the sink will answer you that its memory is full (GW_RES_SINK_OUT_OF_MEMORY). Best regards, |
Hi Gwendal, Thanks for looking at this. Sorry for marking this as a bug, it probably is just a misunderstanding on my part ;) I am trying to figure out:
Maybe what I am looking for is a blocking way to use the c-mesh-api, so I can make it process as many messages as possible without buffering anything at all? All the best,
|
Describe the bug
I am trying to "spam" MQTT with a lot of messages to send into the network, to see what the limits are.
I am running mosquitto, wp-sink-service, wp-transport-service and wp-dbus-service on a Raspberry Pi 400, with a NINA B3 USB Dongle.
I am using the latest wirepas_mqtt_library for python with something like:
I have a script that spams a FastAPI endpoint which calls the code above:
The res output from the backend is:
On the Raspberry Pi logs I find a bunch of:
I have been looking through the c-mesh-api code but cannot find from where the out of memory error is being returned.
And I am also wondering if I should be putting a queue in between my backend and MQTT so that messages are not coming in too fast for the sink to handle them?
I am basically looking for a way to make the sink send out as many messages as possible ;)
To Reproduce
Steps to reproduce the behavior:
Expected behavior
No errors? ;)
Platform details:
The text was updated successfully, but these errors were encountered: