Auto Clear?

Hello, I have a few questions about the usage of the chat plugin which I will list below.

Question 1

I am using the chat plugin and no matter what settings I use, it is recording and displaying every chat entry since the beginning of time.
The problem is that the site had over 1300 users visit on the first day, which caused the server to crash as every single chat from the whole day was loading when the chat loaded.
I see that there is a clear button, but that is manual and is not an ideal solution. Is there a way to:

a) not store all the chat entries in the database. Even if there were an auto clear after x minutes, it would still cause a massive increase in usage as the chat entries would first be saved in the database and then cleared out after x minutes.

b) only display the last x chat entries to a user when they load the page, or maybe show them only the chat entries that happened after they loaded the page?

On the first day alone, there were over 3000 lines of chat and the chat plugin was loading every single line when the page was loaded, causing the page to crash, timeout and generally fail when a user tried to load it.

Question 2

What is the "WYSIWYG button"? I do not want users to be able to add code. I assume the mention of the usage of [code] is what this is as I can not find an explanation of this anywhere. However, when I remove the ticks from all user roles in the advanced tab, the ticks are added again when I save!

Question 3
When I am logged in as admin (still testing other login options), my avatar is linked like this: http://www.kalsadajuantv.com/@KalsadaJuanAdmin and it leads to nowhere as the page naturally does not exist. Shouldn't it be linking to somewhere else or not linking at all?

Question 4
When the chat window loads, it never takes the user to the bottom of the chat, but instead dumps them close to the bottom. This is a pain as all users would want to see the latest messages, but they need to scroll down to be able to see them. Can it be set to always auto scroll to the bottom of the chat?

Question 5
"The Moderator has closed this chat session" is displayed while the page loads, even though the chat is not closed. Once the page loads, the message disappears. Surely it shouldn't be showing at all if the chat is not really closed?

I am NOT using multisite, just a single, standalone install of WP. WP is the latest version and I am using very few plugins as I am still testing the site. I have a dedicated server with more than enough ram, cpu speed etc. The issue is not really the load on the server, but the size that the page becomes when so many chat entries are being loaded with each load of the front page of the website as that is the only place we have the chat at the moment.

Thank you

  • Paul

    Greetings @BusinessOnlinePh,

    a) not store all the chat entries in the database.

    The message during a chat session must be stored somewhere for other users to see then. When a user connects to a chat page (or the bottom corner chat) the messages within that chat are collected into the database. Normally like we do here on WPMU DEV the chats are not open during the day for just anyone to post message. Instead these are moderator lead chat session on specific topic.

    b) only display the last x chat entries to a user when they load the page

    Again as mentioned in the previous point all chat messages are shown. There is a clear and/or archive button but as you mentioned these are manual. There is no option to automatically clear the chat after X minutes or number of messages. Sorry.

    Question 2 What is the "WYSIWYG button"?

    The WYSIWYG button is displayed on the Post and Page editor forms. In the Chat settings you can control what user roles have visibility to be able to add chats to a Post or Page. So on the Post editor form you should see the little button on the editor buttons. See attached image.

    When I am logged in as admin (still testing other login options), my avatar is linked

    The chat avatars are linked to to your @name. This is so users can click on the avatar and this will insert @KalsadaJuanAdmin into the chat message area. There is no other links to user profiles. And not this is not controlled within the settings.

    When the chat window loads, it never takes the user to the bottom of the chat, but instead dumps them close to the bottom

    It sounds like this is related to the mass number of messages you have displayed within the chat.

    "The Moderator has closed this chat session" is displayed while the page loads,

    This again is related to the number of messages. As a safeguard on all chats they load with the setting of closed initially. Once the AJAX calls kick off to pull in messages and the chat session status this will be updated to open. Again, this is because the chats are generally moderator driven. Not an open area for people to post messages.

    Overall I can see that if you leave chat open during the day and let users post message, yes you could end up with an issue as far as performance. At the moment chat does not support any auto clear option. Not to say this could not be added.

  • BusinessOnlinePh

    Greetings Paul and thank you for your swift reply.

    1) I understand that they need to be stored somewhere, but as it stands, the way that the plugin works causes a lot of issues and means that it is not an automated system as a moderator needs to visit the site a few times a day to clear the chat log. There is no way we can have a day off as it needs to be done a few times per day and even through the night.
    One logical option would be to store the chat logs for x hours and also have an option to only show x previous chats when a user loads the page. Or maybe when a new chat message is entered, it can remove the oldest one.
    As you can imagine, thousands of lines of chat cause the page to fail due to the size that it grows to over the day. This knocks the site offline (essentially) as it will not load. As each hour passes, the site takes longer and longer to load as it insists on showing every single chat entry from the very beginning. This naturally has an impact on SEO as the loading speed slows through the day.

    I thought this was supposed to be a chat plugin like a chat room. It seems to be more of a conference or live community support system. The main problem is that the plugin needs to be manned by a moderator 24 hours per day, which I am sure most site owners do not want to do. It seems a bit odd that constant maintenance is required.

    In the description, the "log chat messages" option seemed to be what I am talking about. When this is disabled, why are chats still logged and displayed? What does this option do?

    2) Doh! ofcourse it is. Sorry :slight_smile:

    3) Surely this should not be a link, but a clickable javascript function or whatever is normally used when something is not actually a link as other people will likely right click and open in new tab as I have done.

    4) I deleted all the messages. When there are enough chat entries for it to scroll, it always loads a few above the bottom and never seems to take me to the bottom.

    5) It happens when there is only one chat message and it even happens when there are no chat messages at all. It is displayed while the page is loading and is confusing as the chat is not closed. If the plugin closes the chat while it loads and then opens it, surely it shouldnt show this message as it is confusing due to the fact that it clearly states that chat is closed without any logical reason.

    6) Widget shows "show date" twice. I assume one of them should be "show time".

    Many thanks

  • BusinessOnlinePh

    Hello, we seem to be having a heck of a lot of issues with the chat plugin. I am trying to track all the issues and obtain screenshots of them so that you can see. Below is one that I have managed to get a shot of. The site has had all caching removed and I have completed a hard refresh before testing any issues I found. There are minimal plugins installed and all have been tested with the latest version of wordpress which I am using, none of them are out of date and our server is using the latest stable release of all available items.

    7) Username fails and in place of name, a small box is shown. This also causes there to be no image for the user. In this test, we were a public user and not a registered user or facebook/twitter user. Please see image "username issue".

    8) I am using w3 total cache and only have page cache enabled. When I used enhanced disk mode, it does not let me login, when I use basic disk mode, it logs me in without logging in and I can not logout.
    Surely page cache should be working as the chats are in the DB and I am not caching the DB or anything else at all for that matter.

    I am sorry to overload you with issues, but it seems that there are some serious issues with the plugin which prevent it working in most situations.

    Thank you

  • Paul

    @BusinessOnlinePh,

    First not a problem on the overloading. Keep the issues/ideas coming.

    7) This issue is related to the generic login form the user sees at the bottom of the chat when you allow public users. The form is a simple name and email address. This is only used to setup a session while the user is connected. The reason you are not seeing the default image is because the user has not provided an email for the second field of the form (email address). My guess is most users automatically enter something which might be a password. I'll make a note to check the form submit value and if not a valid email then show the generic avatar.

    8) I'll need to check chat against W3 Total Cache. As it has been a very long time since I've tested things.

  • BusinessOnlinePh

    Hello, it seems to have a lot of issues. Most of them I have mentioned. The main issues are:
    *Incorrect images or no images displaying. At times even the username is incorrect. As you can see in the image above, not only is an image missing, but the username is missing too.
    *Absolutely massive usage of CPU. I used some other chat plugins which have the same features and none of them use anywhere close to the CPU usage that this plugin uses. Your plugin peaked at 95% and all other plugins I used only peaked at 24%. This abnormally high CPU usage meant that we simply could not use the plugin.

    The auto clear function is present in many, many other plugins which allow chat logs to be cleared every x days or hours as well as leaving x messages remaining. A chat function simply is not worth it when it is using 95% of our massive server which has 16 processors I believe. I have never seen anything cause such a high load on our server. As I have to have a chat feature, I simply must use an alternative. I honestly expected more from your plugin, but it was basic at best and caused us no end of issues.

    Thank you very much for your help.

  • Paul

    Ok. I'll try and address these one by one.

    Incorrect images or no images displaying. At times even the username is incorrect. As you can see in the image above, not only is an image missing, but the username is missing too.

    See #7 from my previous response in this thread.

    Absolutely massive usage of CPU. I used some other chat plugins which have the same features and none of them use anywhere close to the CPU usage that this plugin uses. Your plugin peaked at 95% and all other plugins I used only peaked at 24%. This abnormally high CPU usage meant that we simply could not use the plugin.

    Thanks for bringing that to our attention we will be sure and investigate.

    The auto clear function is present in many, many other plugins which allow chat logs to be cleared every x days or hours as well as leaving x messages remaining.

    And as answered prior in this thread our chat plugin is not really setup for auto clear since the design was for moderador drive chat sessions. Not free for all chat open at all times on the site. Yes, I understand you need/require auto-clear. I took over support of this plugin this past summer and you are the first member who has made this request. There are other development tasks ahead of this feature so it is not like I can just jump in and add this feature for you in the next release. I'm sorry. Yes, we know there are many other options for your specific chat needs. My apologies for not being able to just implement these in a timely manor.

    Thank for being a member of WPMU DEV and giving us feedback.

  • BusinessOnlinePh

    Hi, not sure why it has been closed. I am still waiting for an answer to #8 after 2 weeks.

    With #7, your reply does not answer or address the issue. I understand from your reply that an image will not show if there is no image to show. Shouldnt it be using the default image set by wordpress settings?
    The issue I have been reporting to you is that someone with a username of John will suddenly show up as someone else. It is not just that usernames and images are missing, but some usernames will show the incorrect username of someone else who is chatting. An admin saw someone else with their username and even their image.

    When will you be investigating the unacceptably high resource usage? I simply can not use the plugin as it hits 95% of the CPU and stays there, causing the server to lag like crazy. I have a big server with nothing much else on it and your plugin should not be causing such a high resource usage.

    You stated "the design was for moderador drive chat sessions" but I can not see where you say this in your description. Had I known that it was more of a community support live chat, I wouldn't have used it as it would not have met my requirements.

    Thank you

  • Paul

    #8 question regarding W3 Total Cache
    In my testing on development servers I've not seen any related issues with the cache plugin. But this probably not a complete answer as there are many different combinations of setting within the cache plugin that I simply cannot test nor anticipate how you will be using it.

    #7 question regarding wring user names and/or avatars
    As I've answered before I've seen this where public users who are not authenticated via WordPress incorrectly fill out the form at the bottom of the chat. Many users just don't read the field labels they just automatically enter login password. This we cannot control. If on the other hand you are saying that a user during a chat session will go from looking normal to showing with someone else's name/avatar I'm not able to reproduce this on any of my systems.

    When will you be investigating the unacceptably high resource usage? Not really sure what to investigate. We use the same plugin (thought slightly modified) for our own Live Support chat sessions. There are thousands of other members all using this plugins for there chat needs. And there is a small percentage of users, like yourself, who are experiencing resource issues. How can we investigate these as each WordPress system and server configuration is different. Give me some specifics about your hosting and WordPress environment. Tell me what if anything you have tried on your end to investigate the issue. It could be MySQL cache issue. It could be some theme option on your end if you are not running the default theme or some other plugin conflict.

    Within the Chat plugin on the Advanced tab there is a setting to control the interval it will check for new messages. This defaults to 1 second. Have you tried setting this to 2 seconds? How many concurrent users are you seeing in your chat sessions at one time? Generally in our chat sessions we see about 12-15 on a busy day. Averages it is around 6-8 users.

    You stated "the design was for moderador drive chat sessions" but I can not see where you say this in your description. Had I known that it was more of a community support live chat, I wouldn't have used it as it would not have met my requirements.
    I have very little control over the description of the plugin. No it does not state specifically that the plugin is moderator drive only. Nor will you see a listing of featured the chat plugin does not support like private and member-to-member chats. I'll see about getting that stated.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.