eclipse-mosquitto / mosquitto

Eclipse Mosquitto - An open source MQTT broker
https://mosquitto.org
Other
9.08k stars 2.4k forks source link

Large persist database causes client to disconnect #3110

Open ftapajos opened 2 months ago

ftapajos commented 2 months ago

Considering a large persist database

-rw-------    1 mosquitt mosquitt  125.1M Sep 13 16:36 /var/mosquitto/mosquitto.db

And a client myclient connected via unix socket, trying to save the database while receiving a PINGREQ makes the client disconnect

Sep 13 16:36:52 mosquitto[23003]: 1726256212: Saving in-memory database to /var/mosquitto/mosquitto.db.
Sep 13 16:36:52 myclient: Client myclient sending PINGREQ
Sep 13 16:36:58 myclient: Client myclient sending CONNECT
Sep 13 16:36:59 mosquitto[23003]: 1726256219: Client myclient disconnected: Broken pipe.

Environment: Mosquitto broker and libmosquittopp: 2.0.18

Daedaluz commented 3 weeks ago

@ralight this is an issue I also hit sometimes, mostly on slower systems and slow disks.