my PFC200 has run for a few month now without problems. But now it freezed 2 times a day. LEDs were green but the PLC was not reachable. After power off -> on. I found that the MQTT had an error: MAX_RECEIVE_BUFFER_SIZE_EXCEEDED. And MQTT hadn't reconnect since then.
I tried a cold and a warm reset but nothing helped. How can I solve this?
It seems with htop, that there is a very high CPU Load.
In the Log I can see nothing, as mentioned above I've to restart the PLC with Power off/on and the log in codesys was deleted.
Or what do you mean with plclogger?
I can't answer why it's not resetting, but from the description of g_udiMaxReceiveBufferSize, I would guess the sum of sizes of the mqtt packets received in one cycle exceeded this value. So the answer may be to increase that parameter.
Thank you very much so far - As I finaly decided to make an update on the PFC200 - as I've to get it up and running again. But something failed there and no I'm having an other Problem :-(
I'll come back to this, when the error comes back!
Last edit: DerPaul 2023-09-28
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thank you very much for your reply. That helped, it is editable if the library is at root level.
Unfortunately, I noticed that I am not using the MQTT client SL, but the AzureMQTTClient from the Azure IoT Hub Client SL library. At first glance, there is no parameter to increase the message size.
Does anyone know how to increase this in the library or is it simply not possible here?
Hello,
my PFC200 has run for a few month now without problems. But now it freezed 2 times a day. LEDs were green but the PLC was not reachable. After power off -> on. I found that the MQTT had an error: MAX_RECEIVE_BUFFER_SIZE_EXCEEDED. And MQTT hadn't reconnect since then.
I tried a cold and a warm reset but nothing helped. How can I solve this?
Regards,
Paul
more posts ...
which MQTT lib version is this?
It is MQTT_Client_SL 1.4.0.0
Can you please help me?
check the plclogger and use top or htop in by ssh ( which runtime version is this?)
I've post the Versions in the Attachments.
It seems with htop, that there is a very high CPU Load.
In the Log I can see nothing, as mentioned above I've to restart the PLC with Power off/on and the log in codesys was deleted.
Or what do you mean with plclogger?
Last edit: DerPaul 2023-09-23
Any further help please?
we need
plclog
cat /tmp/codesyscontrol.log
or
cat /var/codesys/codesyscontrol.log
depend on which runtime version you use for the error situation
Here is the output Codesyscontrol.log
I can't answer why it's not resetting, but from the description of g_udiMaxReceiveBufferSize, I would guess the sum of sizes of the mqtt packets received in one cycle exceeded this value. So the answer may be to increase that parameter.
https://content.helpme-codesys.com/en/libs/MQTT%20Client%20SL/Current/MQTT-Client/Common/Params/MQTTParam.html
https://content.helpme-codesys.com/en/CODESYS%20Development%20System/_cds_dlg_library_parameter.html
As for the desciption the max Size is 256MB. But I'm sending only small JSON files nothing more...
256MB for the protocol yes, but the default value for this library parameter limits the library to 6kB per task scan.
Okay, i've extendet ist from 6000 to 20000, but the error is still present :-(
...and reduce the load of the plc
How do I found out, which process is taking the load?
check...taskinfo online
check plcshell - plcload
That doesn't help at all:
And in taskconfiguration it says that the cycle time is about 5000us with MQTT enabled FBs and about 2800us whitout
Thank you very much so far - As I finaly decided to make an update on the PFC200 - as I've to get it up and running again. But something failed there and no I'm having an other Problem :-(
I'll come back to this, when the error comes back!
Last edit: DerPaul 2023-09-28
I've got it running again!
For testing I've extendet the
g_udiMaxPacketSize from 6000 to 100000 and
g_udiMaxPayloadSize from 4096 to 80000
After it does run again!
Thank you very much for your help!
That's great news! You're welcome.
Hey Guys,
could you give a explaination of how to change the
g_udiMaxPacketSize from 6000 to 100000 and
g_udiMaxPayloadSize from 4096 to 80000
?
When I go to the library the parameter is not editable. I would really appreciate it :)
Kind Regards
here: (SP20)
Last edit: eschwellinger 2024-06-07
Thank you very much for your reply. That helped, it is editable if the library is at root level.
Unfortunately, I noticed that I am not using the MQTT client SL, but the AzureMQTTClient from the Azure IoT Hub Client SL library. At first glance, there is no parameter to increase the message size.
Does anyone know how to increase this in the library or is it simply not possible here?