Submitting a ticket takes lot of time

Helpdesk for my helpdesk software

Moderator: mkoch227

Post Reply
mandragora
Posts: 1
Joined: Wed Aug 13, 2008 3:04 pm

Submitting a ticket takes lot of time

Post by mandragora »

Script URL: intermal
Version of script: 0.94.1
Hosting company: ---
URL of phpinfo.php: ---
URL of session_test.php: ---
What terms did you try when SEARCHING for a solution: looking for solutions in the hesk section

Write your message below:

hi

I have a little question about submitting a ticket.
When i want submit a ticket it takes a lot of time approximatly 30 to 40 secónds. Then i will receive the Message that the ticket submitted successfully.
As Admin i can see that the ticket will be submittet by clicking the button.
I don`t know why i takes so long time bevor the customer can see the sumit message.

Any Ideas ? whats wrong ?
I´ve testet in FF IE and Opera any always the same problem.

thank you
best regards

mandragora
Klemen
Site Admin
Posts: 10142
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

This must be a server-side problem, maybe too many database connections or too busy server?
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
scoobys
Posts: 1
Joined: Mon Aug 18, 2008 10:53 am

Re: Submitting a ticket takes lot of time

Post by scoobys »

mandragora wrote:Script URL: intermal
Version of script: 0.94.1
Hosting company: ---
URL of phpinfo.php: ---
URL of session_test.php: ---
What terms did you try when SEARCHING for a solution: looking for solutions in the hesk section

Write your message below:

hi

I have a little question about submitting a ticket.
When i want submit a ticket it takes a lot of time approximatly 30 to 40 secónds. Then i will receive the Message that the ticket submitted successfully.
As Admin i can see that the ticket will be submittet by clicking the button.
I don`t know why i takes so long time bevor the customer can see the sumit message.

Any Ideas ? whats wrong ?
I´ve testet in FF IE and Opera any always the same problem.

thank you
best regards

mandragora
Hi,
I have the same problem but sometimes it takes longer then 30-40s to open or change a ticket.
Runnig Ubuntu Swerver 7.10 with LAMP installed.

Regards,
akash
Posts: 13
Joined: Sun Aug 03, 2008 10:10 pm

Post by akash »

Same here... def delay compared to the older version. I would say 30-40 seconds too
I use it under windows on xampp (apache/php)
akash
Posts: 13
Joined: Sun Aug 03, 2008 10:10 pm

Post by akash »

Just an update, what I have noticed is when you hit submit, quickly get to your database and refresh it
the ticket IS inserted in the database - flip back and the ticket is still submitting

so it's not inserting a new record that is the issue - the delay is elsewhere

I even managed to test the DB side further by adding a reply - quickly flippign to the admin side, adding a reply and then checking the DB
the date/time was correct at the point of hitting submit yet both tickets were still "submitting"

Hope that makes sense.

No idea what it is doing in the background
Klemen
Site Admin
Posts: 10142
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

Well there's nothing in the Hesk code that could be causing this (the source code is not hidden so anyone can have a look), it has to be a serer-side issue and I really can't say what it is.

Do you have any other PHP/MySQL scripts that are experiencing similar lag?
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
akash
Posts: 13
Joined: Sun Aug 03, 2008 10:10 pm

Post by akash »

Nope none, even your older version works fine believe it or not

If I get time, I will strip some code out and test it via trial and error... maybe start with removing email. In the old version, I did not have the e-mail system so who knows...
Klemen
Site Admin
Posts: 10142
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

Quite possible it's e-mail (maybe PHP problems with SMTP?), good idea.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
zippytheclown
Posts: 7
Joined: Wed Jan 03, 2007 3:38 pm

This is OLD!

Post by zippytheclown »

I know this thread is old, but it is the exact problem I am seeing. Was there ever any progress on what was causing the delay?
Klemen
Site Admin
Posts: 10142
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

Most likely e-mail not working (or slow mail server/service response). If you delete both lines that start with @mail in submit_ticket.php file it works faster?
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
zippytheclown
Posts: 7
Joined: Wed Jan 03, 2007 3:38 pm

Post by zippytheclown »

Yes, the submit_ticket.php appears immediately with those lines gone, so I assume that confirms the issue is isolated to PHP mail. But with the @mail lines in place, I actually get the email notifications in my inbox before the ticket finishes submitting, so it does not appear to be a delay in the actual sending of the email. I wonder if the PHP mail function is hung up waiting for some kind of confirmation from my isp's mail server...
zippytheclown
Posts: 7
Joined: Wed Jan 03, 2007 3:38 pm

Post by zippytheclown »

Without question, the delay is being caused by some issue in the ISP provided SMTP service. I still don't know if, or for what, PHP could be waiting for from the SMTP server, but it does not appear that you can make the PHP mail function ignore the SMTP server response (if there is one) and just proceed. I have gone around in by installing a simple SMTP relay program on the web server (fortunately for me, this is all internal), and I am letting it argue with the ISP server. All of the delay is gone, since the relay software is accepting the messages from PHP without issue. Thank you, Klemen, as always, for your tireless efforts here. The work you put forward is greatly appreciated.
Raven
Posts: 172
Joined: Sat Jun 20, 2009 12:39 am

Post by Raven »

Well mine is only slow due to my local mail server but since I have never used any previous versions of Hesk (currently using v2.0) I can't say which is faster...

Can I still remove the @mail parts from the following two lines within submit_ticket.php without any issues? and if so, why is it there in the first place (sorry if I'm being thick lol)?

Code: Select all

@mail($email,$hesklang['ticket_received'],$message,$headers);

Code: Select all

@mail($email,$hesklang['new_ticket_submitted'],$message,$headers);
Thanks,

Raven
Klemen
Site Admin
Posts: 10142
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

You can remove them but then sending e-mails will not work. I instructed zippytheclown to do so just to pinpoint the problem and confirm it's the mail server/settings. For normal operation the code should be as it is.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Raven
Posts: 172
Joined: Sat Jun 20, 2009 12:39 am

Post by Raven »

Ahh course, thanks Klemen
Post Reply