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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  (#1) Old
eger Offline
Member
 
Posts: 110
Join Date: Jul 2004
Large file attachments causing parser to hang - 25-09-2007, 06:01 PM

I read a lot of threads on this issue. Yet I found no real solution or what even causes the problem.

The issue is that any emails with attachments over a couple megabytes (2+ mB) grind the parser to a halt. New emails don't come in and the parser the hangs forever until something eventually crashes.

php.ini settings:
Code:
max_execution_time = 60
max_input_time = 120
memory_limit = 64M
upload_max_filesize = 32M
post_max_size = 32M
mysql my.cnf:
Code:
max_allowed_packet = 64M
I am running the parser every 2 minutes from cron so I can't see the output. But when I run the parser URL in my local browser it just eventually times out.

Can anyone shed any light on this? Seems to be a long history issue with no resolution.

I am grabbing emails using POP3. PHP version 4.3.9, Zend Engine v1.3.0, MySQL 4.1.20, Apache 2.0.52.
   
Reply With Quote
  (#2) Old
craigbrass Offline
Senior Member
 
Posts: 5,922
Join Date: Jun 2005
Location: Cumbria, UK
25-09-2007, 06:32 PM

Maybe try increasing he execution time and input time to see if that makes any difference. Doubt it will but worth a try.


Craig Brass - Kayako Forum Squatter (Note: I am NOT a staff member)

Icon Headquarters - Its Elixir - Web2Messenger
   
Reply With Quote
  (#3) Old
eger Offline
Member
 
Posts: 110
Join Date: Jul 2004
25-09-2007, 06:35 PM

Yea I've raised them up to 600 seconds. Then what happens is the cron keeps running the parser and eventually... well I don't think I need to explain what happens after a couple hours of that being unnoticed
   
Reply With Quote
  (#4) Old
BigDawgRob Offline
Member
 
Posts: 98
Join Date: May 2006
Location: Luton, UK
25-09-2007, 06:37 PM

These issues can be a right barrel to sort out.
Firstly I'd suggest increasing the parser time to 10 minutes, it can cause problems if one parser kicks off whilst the other is executing.
Secondly try ramping up the memory limit, 64M seems ok though the mail processor is very memory inefficient. Try looking in your php error log file for clues....
   
Reply With Quote
  (#5) Old
craigbrass Offline
Senior Member
 
Posts: 5,922
Join Date: Jun 2005
Location: Cumbria, UK
25-09-2007, 06:38 PM

Hmm, I suggest you submit a ticket about it then. http://members.kayako.net -> "Get Support". If you do get a solution from them, please post it here for other users.


Craig Brass - Kayako Forum Squatter (Note: I am NOT a staff member)

Icon Headquarters - Its Elixir - Web2Messenger
   
Reply With Quote
  (#6) Old
supportskins Offline
Senior Member
 
supportskins's Avatar
 
Posts: 3,956
Join Date: Aug 2006
Location: Mumbai, India
25-09-2007, 07:49 PM

Quote:
Originally Posted by eger View Post
I read a lot of threads on this issue. Yet I found no real solution or what even causes the problem.

The issue is that any emails with attachments over a couple megabytes (2+ mB) grind the parser to a halt. New emails don't come in and the parser the hangs forever until something eventually crashes.

php.ini settings:
Code:
max_execution_time = 60
max_input_time = 120
memory_limit = 64M
upload_max_filesize = 32M
post_max_size = 32M
mysql my.cnf:
Code:
max_allowed_packet = 64M
I am running the parser every 2 minutes from cron so I can't see the output. But when I run the parser URL in my local browser it just eventually times out.

Can anyone shed any light on this? Seems to be a long history issue with no resolution.

I am grabbing emails using POP3. PHP version 4.3.9, Zend Engine v1.3.0, MySQL 4.1.20, Apache 2.0.52.
Which version of Kayako are you using?



Professional and Affordable Kayako Skins - Specialists in Kayako Skinning & Customization - Professional Paid Support
Our Skins and Services - http://www.supportskins.com/store/
SupportSkins.com - http://www.supportskins.com/
   
Reply With Quote
  (#7) Old
craigbrass Offline
Senior Member
 
Posts: 5,922
Join Date: Jun 2005
Location: Cumbria, UK
25-09-2007, 08:11 PM

He is running 3.11.01 according to his previous posts. I looked it up earlier when he first posted.


Craig Brass - Kayako Forum Squatter (Note: I am NOT a staff member)

Icon Headquarters - Its Elixir - Web2Messenger
   
Reply With Quote
  (#8) Old
eger Offline
Member
 
Posts: 110
Join Date: Jul 2004
26-09-2007, 05:00 PM

I raised all my limits another 32mb. Now, the parser seems to timeout. However there is no error message in any logs and no emails downloaded or parsed. It simply stops and no emails are parsed. Really troubling... We have had to setup a dummy email client to download emails and leave them on server. But move email messages larger than 1mb to a separate folder so the parser doesn't lock up.

Nobody else experiences this?
   
Reply With Quote
  (#9) Old
supportskins Offline
Senior Member
 
supportskins's Avatar
 
Posts: 3,956
Join Date: Aug 2006
Location: Mumbai, India
26-09-2007, 08:15 PM

max_execution_time, change it to 600 and increase your cron time from 2 minutes to every 5-8 minutes.



Professional and Affordable Kayako Skins - Specialists in Kayako Skinning & Customization - Professional Paid Support
Our Skins and Services - http://www.supportskins.com/store/
SupportSkins.com - http://www.supportskins.com/
   
Reply With Quote
  (#10) Old
eger Offline
Member
 
Posts: 110
Join Date: Jul 2004
27-09-2007, 04:02 PM

I already said I tried this in post #3. I've let them run for up to 20 minutes. The wget never ends and just continuously fills up the process list. If the parser doesn't finish within 2 minutes for one message it doesn't seem like waiting 5 minutes will work...

It shouldn't take more than a couple seconds to parse the actual message of a 5mb file right?
   
Reply With Quote
  (#11) Old
craigbrass Offline
Senior Member
 
Posts: 5,922
Join Date: Jun 2005
Location: Cumbria, UK
27-09-2007, 04:07 PM

I would say it should be a max of 15-20 seconds for that size of file. I would expect a lot lower. I think submitting a ticket is your best option.


Craig Brass - Kayako Forum Squatter (Note: I am NOT a staff member)

Icon Headquarters - Its Elixir - Web2Messenger
   
Reply With Quote
  (#12) Old
supportskins Offline
Senior Member
 
supportskins's Avatar
 
Posts: 3,956
Join Date: Aug 2006
Location: Mumbai, India
27-09-2007, 04:33 PM

My best guess is the issue is with the PHP configuration or Mail Parser setup. Btw, how many POP3 accounts have you added in the software?



Professional and Affordable Kayako Skins - Specialists in Kayako Skinning & Customization - Professional Paid Support
Our Skins and Services - http://www.supportskins.com/store/
SupportSkins.com - http://www.supportskins.com/
   
Reply With Quote
  (#13) Old
eger Offline
Member
 
Posts: 110
Join Date: Jul 2004
27-09-2007, 04:37 PM

I use just one POP3 account to get all the mail then use different queues set to pipe method which take the To: address into the appropriate queue. I am now wondering if it's possible the parser is overloaded because I'm trying to use piping queues to handle the different To: addresses rather than Pre parser rules.. Not sure how this might affect downloading and parsing files though.
   
Reply With Quote
  (#14) Old
supportskins Offline
Senior Member
 
supportskins's Avatar
 
Posts: 3,956
Join Date: Aug 2006
Location: Mumbai, India
27-09-2007, 04:50 PM

I think you need someone to look into your server as well as PHP configuration. I suggest you create a support ticket from the Kayako Members Area.



Professional and Affordable Kayako Skins - Specialists in Kayako Skinning & Customization - Professional Paid Support
Our Skins and Services - http://www.supportskins.com/store/
SupportSkins.com - http://www.supportskins.com/
   
Reply With Quote
  (#15) Old
jreed Offline
New Member
 
Posts: 11
Join Date: Aug 2007
16-10-2007, 02:58 AM

FYI, I figured out that the parsing code is really inneficient. When it searches the body of an email for the ticket ID it searches through the raw mime data, which includes all the binary attachments. I changed my code so it only searches the body and does not search attachments. Parsing 6MB emails went from 80 seconds to 4 seconds on my system.

File: /modules/parser/functions_parsercore.php
Original code:
Code:
  if (empty($ticketiddata["id"]))
  {
   // We try to look it up in the entire mail
   $ticketiddata = parseTicketID($_email["mimedata"]); // try to look it up in the mail body
   parserDebug("LOOKUP: Found Ticket ID In Body!");
  }
Change to:
Code:
  if (empty($ticketiddata["id"]))
  {
   // We try to look it up in the text body
   $ticketiddata = parseTicketID($_email["text"]); // try to look it up in the mail body
   parserDebug("LOOKUP: Searching Ticket # In text Body!");
  }
  if (empty($ticketiddata["id"]))
  {
   // We try to look it up in the html body
   $ticketiddata = parseTicketID($_email["html"]); // try to look it up in the mail body
   parserDebug("LOOKUP: Searching Ticket # In HTML Body!");
  }
   
Reply With Quote
Reply

Tags
attachments, causing, hang, large, 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

Similar Threads
Thread Thread Starter Forum Replies Last Post
large file attachments, hang in mailbox, not parsed bwong@patton.com SupportSuite, eSupport and LiveResponse 5 26-01-2007 08:14 AM



Powered by vBulletin® Version 3.7.5
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
Help desk software by Kayako.


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