Craig Brass Systems Forum: Submitting Ticket takes long time and/or times out - Craig Brass Systems Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Submitting Ticket takes long time and/or times out

#1
User is offline   Matt 

  • Member
  • Pip
  • Group: Members
  • Posts: 23
  • Joined: 24-October 08
I have used the SOAP integration in the past however when submitting an initial ticket it either times out (90%) of time or takes about 1 minute to show the page.

Today I had time to try the API integration and get the same result. In both cases the ticket is submitted instantly, its just the response is taking forever.

I have the knowledge base articles integration working fine. Also the postTicketReply() works instantly. I am not sure why the submitTicket() is taking so long?

Any ideas?
0

#2
User is offline   Andrew Gillard 

  • Staff - Lead Developer
  • Pip
  • Group: Developers
  • Posts: 97
  • Joined: 04-March 07
  • Gender:Male
  • Location:Basingstoke, United Kingdom
Presumably you aren't seeing these kinds of speed problems when accessing Kayako through its normal interface? If you are, that would suggest a problem within Kayako, and not anything related to us.

Are you uploading attachments for your new tickets?

Besides that, I'm not really sure what could be going on. The best I could suggest would be adding some logging/profiling code to the API code (lib/api.class.php) inside the submitTicket() method - just some code to either echo or write to a text file the current time including milliseconds after each line in the method (especially towards the end, after the new ticket itself has been created, as you say that happens instantly). If you find a significant delay in there at any point, that would allow us to look more closely at the slow lines.
Andrew Gillard
Lead Developer - Craig Brass Systems
0

#3
User is offline   Matt 

  • Member
  • Pip
  • Group: Members
  • Posts: 23
  • Joined: 24-October 08
Correct. No issues with Kayako itself. The postTicketReply works instantly just the SubmitTicket. I will work on getting some log info this evening and let you know what I find.
0

#4
User is offline   Matt 

  • Member
  • Pip
  • Group: Members
  • Posts: 23
  • Joined: 24-October 08
Here is what I have found so far.

The delay is with the $ticketIdData = @createTicket(...) function.
Time before this function: 0.267secs
Time after this function: 61.2809secs
Consistent with 5+ tries.

I also get a warning message:
Warning: Invalid argument supplied for foreach()
The code is in /support/modules/tickets/functions_ticketcore.php
foreach ($_SWIFT["statuscache"] as $key=>$val)
{
$ticketstatusidlist[] = $val["ticketstatusid"];
}

Any ideas? I will keep investigating.

More Info:
Ran the time check inside the functions_ticketcore.php and found the entire delay is with this function:

$_ticket->alerts->raiseAlert(ALERT_NEWTICKET, array("contentshtml" => $_ticket->returnProcessedContent($contents), "contentstext" => getProcessedText($contents), "contentssms" => substr(stripHTMLTags($contents),0,40), "fullname" => $fullname));

Not to familiar with Kayako code to know how much deeper to dig of what here might cause the 60 second delay.
0

#5
User is offline   Matt 

  • Member
  • Pip
  • Group: Members
  • Posts: 23
  • Joined: 24-October 08
It appears to be a delay with the SMS alerts in the function (although I did get the SMS alerts instantly). I turned them off and now the page processes instantly.

OK but the issue I see is that the post ticket reply I also had SMS alerts active and that API works instantly, so I am not sure why one works and one there is a delay.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users