Kayako logo
SupportSuite, eSupport and LiveResponse Discussion, troubleshooting and feedback related to Kayako's flagship support desk products SupportSuite, eSupport and LiveResponse.

Kayako develops robust helpdesk software, live chat and real-time visitor monitoring software.
Kayako is trusted by more than 30,000 organizations, including a number of Fortune 500 companies and government institutions.
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  (#1) Old
Merit Offline
New Member
 
Merit's Avatar
 
Posts: 11
Join Date: May 2005
Location: Toronto, ON
Parser log cleared / deleted early - 12-06-2006, 03:46 PM

I noticed recently after implementing the mail parser that my parser logs were being cleared rapidly. Despite having set the log churn in the mail pareser settings to 30 days, they were being deleted prior to this date.

I discovered after a little investigation that the daily cleanup cron job is what does the clearing of the parser log. The issue is that within the cron cleanup, there is a bug in which it uses the log clearing timeline as set in the "CPU Optimization & Server Settings" NOT the mail parser "Log Churn Timeline" as it should.

Thsi is simply due to the fact that in the code contained in cron_cleanup.php, there is no line that reads the value for the mail parser log churn, it just uses the one specified on the server settings page.

** No warranty, liability or support provided for implementing the following code. Do so at your own risk! **

Simply ADD the following line of code to the top of the if statement shown below in cron_cleanup.php in the modules\core folder:

$cleartime = DATENOW - (intval($_SWIFT["settings"]["pr_logchurndays"])*86400);

Code:
	if ($module->isRegistered(MODULE_PARSER))
	{
		$cleartime = DATENOW - (intval($_SWIFT["settings"]["pr_logchurndays"])*86400);
		$_parserlogidlist = array();
		$dbCore->query("SELECT `parserlogid` FROM `". TABLE_PREFIX ."parserlogs` WHERE `dateline` < '". intval($cleartime) ."';");
		while ($dbCore->nextRecord())
		{
			$_parserlogidlist[] = $dbCore->Record["parserlogid"];
		}

		if (count($_parserlogidlist))
		{
			$dbCore->query("DELETE FROM `". TABLE_PREFIX ."parserlogs` WHERE `parserlogid` IN (". buildIN($_parserlogidlist) .");");
			$dbCore->query("DELETE FROM `". TABLE_PREFIX ."parserlogdata` WHERE `parserlogid` IN (". buildIN($_parserlogidlist) .");");
		}

	}
   
Reply With Quote
  (#2) Old
Davr Offline
New Member
 
Posts: 4
Join Date: Dec 2008
Question 08-12-2008, 04:44 PM

Hi,

I have the same exact problem (which is a little worrying, since the bug was reported over two years ago and is still not fixed), however I'm running the hosted version and am not able to edit the PHP files. Is there any recommended solution for this in that case? Should I just increase the time for the server logs?

Mainly I would like to keep parser logs for a couple weeks, so I can browse it every once in a while, just to make sure I'm not missing any emails.
   
Reply With Quote
  (#3) Old
John Haugeland Offline
Member
 
Posts: 1,223
Join Date: Dec 2007
Location: Boise, Idaho
08-12-2008, 06:41 PM

Yeah, it's really easy to lose things in vBulletin; I don't think anyone's ever seen this. That's why we try so hard to get people to open a bug tracker entry or send a support ticket to bugs@ when they discover a bug. There is no guaranteed support on the forums. Bugs need to be reported.

I'll file this today.


John used to be a Kayako developer
   
Reply With Quote
  (#4) Old
Davr Offline
New Member
 
Posts: 4
Join Date: Dec 2008
08-12-2008, 07:07 PM

Ah ok, I was just following the steps in the Member's Area >> Get Support, I was on step #3 (post in the community forums). If I hadn't heard anything in a day or two I would have gone to the ticketing thing next.
   
Reply With Quote
  (#5) Old
John Haugeland Offline
Member
 
Posts: 1,223
Join Date: Dec 2007
Location: Boise, Idaho
08-12-2008, 08:11 PM

And, to be clear: THE FORUMS ARE NOT WHERE TO REPORT BUGS. OPEN A SUPPORT TICKET.

There is no way, in vBulletin, to list things which haven't been handled yet.


John used to be a Kayako developer
   
Reply With Quote
  (#6) Old
John Haugeland Offline
Member
 
Posts: 1,223
Join Date: Dec 2007
Location: Boise, Idaho
08-12-2008, 08:13 PM

This is now tracked as issue 869.
Kayako Bug Tracker - Viewing Issue #869 - Possibly incorrect log clearing behavior


John used to be a Kayako developer
   
Reply With Quote
  (#7) Old
Patje Offline
New Member
 
Posts: 15
Join Date: Sep 2008
29-05-2009, 03:26 AM

hi,

I have the same problem and I tried to add the given line, but our is a binary:
Quote:
[root@apache1 core]# less cron_cleanup.php
"cron_cleanup.php" may be a binary file. See it anyway?
How can I prevent logs from being deleted too quickly?

thanks, Patrick
   
Reply With Quote
Reply

Tags
cleared, deleted, log, parser

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78