I have a spreadsheet of about 150 Mosquitto log entries. It is paired with 30 messages I published, matched in time. That is, there are about 5 times as many Mosquitto entries as published items. Many seem to indicate that things I published timed out. Others say "Socket error". But all the subscribers got the messages.
My problem is, after publishing 2 or 3 per hour for 2 or 3 days, suddenly none of the subscribers get anything I publish. But the log "looks the same" as far as I can tell. But there are thousands of entries.
EDIT: The link will bring up my spreadsheet. I edited it to just 44 rows. There are two vertical sections. Messages I published on the left and Mosquitto log entries on the right. Sorry, when I pasted them into the spreadsheet the delimiter characters spread them across many columns. The first 3 or so pubs seem fine but then the 12:13:26 pub has a socket error although the subscriber received the pub. After that things seem to get worse with timeouts also.
The rest of the 100 or so rows (that I didn't include) are very similar. Timeouts and socket errors. But the subscribers get the pubs.
The pubs come from a C program I wrote that runs on my Raspberry Pi. The subscribers are items in OpenHAB that is also on the same RPi. Here is the C code that does the publishing:
void publish(char *Topic, char *action)
{
mosquitto_lib_init();
mosq = mosquitto_new(NULL,true,NULL);
mosquitto_loop_start(mosq);
mosquitto_connect_async(mosq,MQTT_Host,MQTT_Port,1);
mosquitto_publish(mosq,NULL,Topic,strlen(action),action,2,false);
printf("Mosquitto Sending: %s %s to %s:%d\n",Topic,action,MQTT_Host,MQTT_Port);
}