Looking to see if anyone provide any insight or solution to my issue. I have a raspberry pi thats running a python script that connects to a socket channel (well http long polling keep alive to be exact). It is listening for a specific message. When it gets the message, it needs to do something. It needs to do that said something in a reasonable amount of time: say 1-3 seconds. The problem I am having is that it takes up to 6-10 seconds for the raspi to receive the message. This interestingly only happens if the raspi client has not received messages in a while. If it is consistently receiving messages, it'll receive and process the message instantly. Any insights?
I've been lurking for some time and reading on both real time linux and nice. Will soon be experimenting with both and could post results here. Anyone run into a similar issue?
I've ran a few experiments to narrow down the issue.
Its not the raspi network because I have ran on different networks, with different sims, and tried both lte and wifi with the same results
Its not the python socket client code because I ran it the client code on both mac and ubuntu and the messages will be received and processed immediately.
Its not the 'do said something' post message action because running that on its own happens instantly.
Any help would be appreciated and regardless will report my findings