Closed jdavid closed 5 years ago
So, there were 2 issues.
Clients connections to RabbitMQ timeout after 60s of inactivity, a feature known as heartbeat allows to keep alive the connection.
The wsn_data_django.py
program makes a POST request to the Django server. When the quota of the 4G network was consumed the 4G network slowed down, making the POST request to take more than 60s. This produced the timeout error, RabbitMQ closing the connection to the client (the wsn_data_django.py
program).
The solution to this has been:
The 4G network speed was restored, but the first error has produced the messages to pile up in the queue, producing a new error.
RabbitMQ pushing messages faster to wsn_data_django.py
than this was able to deliver, RabbitMQ eventually fails to send a new message and closes the connection to the client.
Solution:
Fixed.
I've found these errors in the
/var/log/rabbitmq/rabbit@raspberrypi.log
file:I've reproduced the first one locally, introducing a
time.sleep()
.