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?
Page 1 of 1
Submitting Ticket takes long time and/or times out
#2
Posted 30 April 2009 - 08:36 PM
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.
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
Lead Developer - Craig Brass Systems
#3
Posted 30 April 2009 - 09:22 PM
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.
#4
Posted 01 May 2009 - 12:20 AM
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.
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.
#5
Posted 01 May 2009 - 12:37 AM
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.
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.
Share this topic:
Page 1 of 1
Sign In »
Register Now!
Help

Back to top








