Page 1 of 1

hesk 2.5.1 flood of replies databse size from 25Mb to 200+Mb

Posted: Fri May 02, 2014 8:32 pm
by dr_patso
Hi,

Outlook 2013 is hooked up to the mailbox hesk is checking, for some reason when hesk would delete the mail, it would stay in the outlook 2013 client and reupload it to hesk and it would just keep popping in the replies...

Is there a way for hesk to check duplicate replies and not insert them into the database?

On a more important note. I need to know how I can identify which user this flood of replies came from and how I can delete these duplicate replies! my database went from 25MB to 100MB to 250MB in just two days, but the problem is not happening anymore.

Re: hesk 2.5.1 flood of replies databse size from 25Mb to 20

Posted: Fri May 02, 2014 10:46 pm
by dr_patso
it seems the system only tracks replies frmo the owner, the replies table does not include the ticket owner if it's a "customer reply" which is what has flooded the DB..

I'll have to build some kind of mysql query to see who owns the tickets that got flooded.

Re: hesk 2.5.1 flood of replies databse size from 25Mb to 20

Posted: Sun May 04, 2014 2:01 pm
by Klemen
Deleting messages is not something HESK can do, the email server/software needs to do that. Also check that you don't have "Keep a copy" is set to OFF in HESK POP3 settings.

In the hesk_replies table the "replyto" column contains ID of the ticket the reply belongs to.

Re: hesk 2.5.1 flood of replies databse size from 25Mb to 20

Posted: Mon May 05, 2014 8:47 pm
by dr_patso
thanks klemen, was able to fix my rpoblem with mysql queries.

pinpoint the tickets with the huge flood of replies

Code: Select all

SELECT hesk_tickets.id, hesk_tickets.dt, hesk_tickets.owner, hesk_replies.replyto, COUNT( hesk_replies.replyto ) 
FROM hesk_tickets, hesk_replies
WHERE hesk_tickets.id = hesk_replies.replyto
AND hesk_tickets.dt
BETWEEN  "2014-04-23"
AND  "2014-04-26"
GROUP BY hesk_tickets.id
ORDER BY COUNT( hesk_replies.replyto ) DEC

the delete all replies with that the ticket ids in the replyto column

Code: Select all

DELETE from hesk_replies WHERE hesk_replies.replyto IN (6591,6596,
6597,
6599,
6561,
6589,
6560,
6584,
6583,
6577,
6574,
6567,
6578,
6566,
6586,
6572,
6581,
6576,
6582,
6570,
6571,
6575,
6573,
6585,
6579,
6568,
6569,
6580)
24,000 rows delete, optimized hesk_replies table and the table went from 200+mb to 3.5mb.. I'm happy :D