Help Center Live Community

Support => Daily Operations => Topic started by: neo4trace on November 04, 2007, 01:44:06 AM



Title: Loosing Messages
Post by: neo4trace on November 04, 2007, 01:44:06 AM
Hi:

We have deployed the HCL system recently on one of our applications.
Since launch, our agents are loosing a lot of chat messages when they are chatting with the end customers.

The issue occurs whenever a customer or agent types more than 200-300 characters with a few line breaks in the text box, and sends the message. Whoever sends that kind of a message gets cut off, from that point on the communication is only one way where in the the other side can send messages, but not the one who had initiated a long string.

The browsers used by agents and the end customers have been IE 7,6 and firefox, the problem is consistent accross all browsers. HCL is installed on a Linux Box, with PHP5.

It is a very serious issue now, because the system is live and our customers are getting fraustrated when they dont get messages back from agents.

Please advice on how we can rectify this?

Thanks.


Title: Re: Loosing Messages
Post by: victor on November 05, 2007, 04:54:39 PM
what version of HCL are you using? because on the last version there is a maxlength of 150 characters to be sent from costumer and admin side


Title: Re: Loosing Messages
Post by: neo4trace on November 06, 2007, 06:55:13 AM
How can we increase the limit from 150, without compromising on system performance?
We have the 2.1.5 version installed.


Title: Re: Loosing Messages
Post by: HCL Admin on November 08, 2007, 07:40:42 PM
Hmm, I'll double check the source, but I believe just adjusting the MySQL table to allow more the 150 characters should do the trick.  I'll do some checking today if I see anything else that might get in the way.


Title: Re: Loosing Messages
Post by: neo4trace on November 09, 2007, 01:53:42 PM
FYI: we already tried all that and seem to loose messages, when you test, try to have a few sentences in there, then 2 line breaks, and a few more sentences in, thats when you get cut off in the communication. Adjusting length in MySQL with few other tweaks can only fix straight long strings I believe.


Title: Re: Loosing Messages
Post by: HCL Admin on November 13, 2007, 12:30:57 PM
It looks like the code is trying to avoid a potential mysql error, and is a bit over zealous about it.  I'm trying to figure out a graceful way to do it that doesn't eliminate the ability to extend the limit. 

BTW that limit is there to prevent the database from becoming overly large.  If the field size is 4000 characters, even sending "yes" would take 4000 bytes of hard drive.  Some shared hosts might not be happy if you have 27 gigabytes of database. :)


Title: Re: Loosing Messages
Post by: neo4trace on November 14, 2007, 12:35:07 AM
Agreed, bloated DB wont fly.   ;)

Also, can you respond to me other question I had sent you in the private message, about the switching of Offline/Online Icon in a manner which does not involve writing to DB, dont know maybe a Ajax call back, or writing to a file.


Title: Re: Loosing Messages
Post by: humaneasy on November 14, 2007, 03:27:38 AM
FYI: we already tried all that and seem to loose messages, when you test, try to have a few sentences in there, then 2 line breaks, and a few more sentences in, thats when you get cut off in the communication. Adjusting length in MySQL with few other tweaks can only fix straight long strings I believe.

Is it being cut on the same lenght always or is it being cut on the line breaks?

Sometimes, on a field not being TEXT but VARCHAR you may need to convert that line breaks into another thing like using nl2br().


Title: Re: Loosing Messages
Post by: neo4trace on November 14, 2007, 02:16:06 PM
Probably cut was not the right word, what happens when someone enters text with line breaks is, his/her message does not reach the other end and that user gets completely cut off from the communication, after which point, they can see that the other person is typing a message, but none of the messages come through.


Title: Re: Loosing Messages
Post by: HCL Admin on November 15, 2007, 04:59:40 PM
Ah, ok, that changes things a little bit.  I'll play with the filter a little bit.  As far as not writing to the DB for a on-line/off-line change, it's done that way to minimize traffic, since if the toggle was stored on the client end, it would have to query a client everytime someone accessed a page.  Remember that the server is a web server and is by nature stateless.  We could store in a session variable, however then we would need to do a bunch of mysql look-ups to establish which session we needed.  However that is one area where we could clean up the MySQL a little and perhaps help reduce overhead.


Title: Re: Loosing Messages
Post by: aznxbandit on December 04, 2007, 02:35:13 AM
It looks like the code is trying to avoid a potential mysql error, and is a bit over zealous about it.  I'm trying to figure out a graceful way to do it that doesn't eliminate the ability to extend the limit. 

BTW that limit is there to prevent the database from becoming overly large.  If the field size is 4000 characters, even sending "yes" would take 4000 bytes of hard drive.  Some shared hosts might not be happy if you have 27 gigabytes of database. :)

So have, is there a way to extend the character limit?


Title: Re: Loosing Messages
Post by: aznxbandit on December 27, 2007, 11:58:24 AM
It looks like the code is trying to avoid a potential mysql error, and is a bit over zealous about it.  I'm trying to figure out a graceful way to do it that doesn't eliminate the ability to extend the limit. 

BTW that limit is there to prevent the database from becoming overly large.  If the field size is 4000 characters, even sending "yes" would take 4000 bytes of hard drive.  Some shared hosts might not be happy if you have 27 gigabytes of database. :)


I would like to know how to extend the chat text length. I host my own server and I don't have a problem with the database growing 27 gigabytes. How can I extend the chat character limit?


Title: Re: Loosing Messages
Post by: HCL Admin on December 27, 2007, 09:35:11 PM
Still working on this, I managed to foobar my local copy, and since the SVN just got sold, I have to restore a backup tape and try to make the filters configurable.


Title: Re: Loosing Messages
Post by: neo4trace on January 04, 2008, 08:04:19 PM
same here mlz, I really am not too concerned about the DB size, because limiting to 150 characters is causing a negetive effect in how we deliver customer service, since a lot of customers would like to type freely without such limitations.

thanks.


Title: Re: Loosing Messages
Post by: spatter9999 on March 08, 2008, 01:44:41 AM
Any word on this?  I looked at the MySQL table to see if I could change the limit, but I'm not sure I'm looking in the right place.

I'm wanting to increase the current 150 character limit to about 500.  I don't care anything about line break functionality.

In the MySQL db, I see a table called "hcl_chat" which contains a field called "message" of type TEXT.  It doesn't appear to have a character limit.  Is the limit imposed in the code itself?  Anyone know where to find it?


Title: Re: Loosing Messages
Post by: spatter9999 on March 08, 2008, 07:09:52 PM
UPDATE:

I'm using the Bliss template... so I edited the file ../templates/Bliss/chat_send.tpl

I changed:
Code:
<input type="text" autocomplete="off" name="chat_box" id="chat_box" size="30" maxlength="150" onkeypress="parent....
to:
Code:
<input type="text" autocomplete="off" name="chat_box" id="chat_box" size="30" maxlength="500" onkeypress="parent....

But it didn't work like I wanted.  It will now let the operator and end-user type up to 500 characters, BUT...
1) It pops up a message saying the message is too long and will be trucated.  (It truncates down to 300 characters)
2) It displays the new truncated 300 char message to the display of the person who typed it, but not to the other user

Nothing over 150 char seems to get written to the database and shown to the other person.

Please help... I have to get this thing running this weekend.


Title: Re: Loosing Messages
Post by: enkidu on November 25, 2008, 12:35:26 AM
"bump" Can anybody please answer honestly to this question:  Can this problem (150 limit) be solved or not?

 Don't meant to be rude but. . .  chat application with 150 character limit?  :D

 ( by the way - search on this forum gives a random answers.  Feature or bug? )


Title: Re: Loosing Messages
Post by: petro on November 25, 2008, 09:39:04 AM
storing "yes" in a 4000 char length varchar field do not take 4000 bytes.   
Actually it requires 4 bytes.  

hxxp: dev.   mysql.   com/doc/refman/5.   0/en/char.   html

Quote from: HCL Admin link=topic=279.   msg1700#msg1700 date=1194953457
It looks like the code is trying to avoid a potential mysql error, and is a bit over zealous about it.     I'm trying to figure out a graceful way to do it that doesn't eliminate the ability to extend the limit.    

BTW that limit is there to prevent the database from becoming overly large.     If the field size is 4000 characters, even sending "yes" would take 4000 bytes of hard drive.     Some shared hosts might not be happy if you have 27 gigabytes of database.    :)


Title: Re: Loosing Messages
Post by: kirpi on December 03, 2008, 10:12:38 PM
> that limit is there to prevent the database
> from becoming overly large.         

I suggest that, if any limit is set, a counter is shown while the user is typing, which tells how many characters are left for the message.   Most probably there are many ways to achieve this[1].      

Luigi

----
[1] hxxp: www. quirksmode. org/dom/maxlength. html just being a mere example.