Correct MUC History not showing in clients

We have an Openfire 3.6.4 install on Ubuntu using the Embedded database that is not sending MUC history to users. All users are connecting to the MUC rooms with GTalk accounts and so far are all reporting intermittent and incomplete history being sent when joining the room. Using both Pidgin and Empathy on the same workstation to connect to the room will show different history but none are up to date.

Openfire is configured with ‘Show Entire Chat History’ in the Group Chat Settings, a Flush Interval of 300 seconds and Batch Size of 50. I’ve tried changing these values to return only 25 records of History and to write the log to the database after 60 seconds or 10 seconds etc. I made sure to restart the server after each of these changes but nothing seemed to make a difference.

After restarting the server a large portion of the history that actually was being returned is now missing. My guess is that the regularly flushed data is ending up in a transaction or such that is not being written to disc very often so restarting the server is clearing the temporary cache.

Any ideas on how to resolve this? I was considering binning the embedded server and switching to Postgres or MySQL instead. That way at least I would have a better idea of when data is hitting the db.

Thanks!

I believe I found the problem.

I ended up switching to Postgres just to have some more control at the DB level. I watched incoming queries coming in and saw that Openfire loads the MUC history on service start but not each time a client joins a room. I couldn’t find the actual cache entry for that data but I assume it is in there somewhere.

With Group Logging History set to ‘all’ and clients requesting max history messages of 20 or so (Pidgin) the server would always return the logs from the earliest to the latest, which would mean clients would always seem the same history and not the more recent events. Using the XMPP Console in Pidgin and sending manual history stanzas that use the more specific ‘seconds’ and ‘since’ options it was possible to see the correct history entries. Since Pidgin and Empathy don’t have an admin option to change the default history stanza settings I switched the server to only send the 20 most recent items. This aligns with what the client is requesting for ‘maxstanzas’ and thus the client is getting the correct history.

So far so good, I will keep testing it over this weekend and confirm it is working as expected.