Frequent Apache restarts and duplicate Tickets

Moderator: crythias

Locked
viettdi
Znuny newbie
Posts: 7
Joined: 09 Jan 2013, 18:23
Znuny Version: 3.1.9
Real Name: Luca
Company: IdeaIT

Frequent Apache restarts and duplicate Tickets

Post by viettdi »

Hello to all,

this is the first time I write in this forum, I hope you can help me solve a problem with OTRS.
My company operates two installations of OTRS, one as own trouble ticketing platform (version 3.1.9) and one for a customer (3.1.11), both on Windows Server 2008.

The system installed at my company (VMware Virtual Machine with Windows Server 2008) works well, smoothly, while the installation at the client (Oracle VirtualBox virtual machine with Windows Server 2008 R2, 2GB of RAM and 1 CPU core) has a significant problem: from time to time is happening the creation of duplicate tickets or duplicate articles , that is the exact same request but with two different ticket numbers and, almost always, creation time different even of some minutes.

After a long analysis by crossing the log of OTRS the error.log of Apache and the Windows event viewer, seems almost certain that the duplication of tickets and articles is due to frequent restart of Apache following Perl module errors (ERROR: OTRS- CGI-10 Perl: 5.12.3 OS: MSWin32 ...) ([notice] Parent: child precess exited with status 255 - Restarting).

The traceback which follows to 'ERROR' is not always the same (even if many times is related to "TriggerEscalationStopEvents called for TicketSLAUpdate").

In practice it seems that sometimes, when the agent is going to create a new ticket (or to enter a note, for example), some event causes a restart of Apache and OTRS ticket is created the same before and after restarting the service (for this often duplicates haven't the same minute and second of creation).

To be noted that the database of Otrs is replication (mySQL replication) with another virtual machine configured in the same way (installed on a different physical server) available to the end user only if the main machine goes down (there isn't a load balancing).

It would seem that since we increased the default value of MaxRequestsPerChild from 4000 to 100000 in the apache2-httpd.include.conf file, the restart of Apache are slightly less in number and those due to the exceeding of this threshold at least have disappeared, even if the problem of duplicate still presents itself throughout the day.

I've attached to this post the file error.log of Apache, so it is easier to take a look on the situation and see the large number of suspicious errors (which, to tell the truth, are also present in our "working" Otrs installation log).

Could you help me please with this unpleasant problem?

Thank you all.
You do not have the required permissions to view the files attached to this post.
viettdi
Znuny newbie
Posts: 7
Joined: 09 Jan 2013, 18:23
Znuny Version: 3.1.9
Real Name: Luca
Company: IdeaIT

Re: Frequent Apache restarts and duplicate Tickets

Post by viettdi »

Please help me! :(
I've seen that many users have Apache Logs full of errors and restarts, but only on our Otrs installation is this causing tickets and articles duplicates?
viettdi
Znuny newbie
Posts: 7
Joined: 09 Jan 2013, 18:23
Znuny Version: 3.1.9
Real Name: Luca
Company: IdeaIT

Re: Frequent Apache restarts and duplicate Tickets

Post by viettdi »

Nothing, you can not deal with them, even after a tuning of the 'httpd.conf and of the mpm (increasing the maxrequestperchild).
The nice thing is that the code already provides for prevention of duplicate (disable form for multipleSubmits), then I can't understand how a form (eg AgentTicketPhone) or the creation of a new article (eg. New note) can be submitted, cause the restart of Apache child and be submitted again. Issue with cache or memory?

I wish to remember that the virtual machine has one core and 2 GB of RAM available (the memory usage never exceeds 1.3 GB) so I think it's not a problem with memory, but, instead, of Apache's child management.

Please help me finding a workaround to this issue, unfortunately I do not have much experience with Apache.
The important thing would be to avoid the submit before and after the restarting of the child, but I can't find documentation about this behavior of Apache.

Thanks to all.

Luca
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Frequent Apache restarts and duplicate Tickets

Post by crythias »

viettdi wrote: that is the exact same request but with two different ticket numbers and, almost always, creation time different even of some minutes
Usually this points to a mirrored environment that is also fetching tickets ... to the same database? well, that is different.

But it's not something that appears to be fixable via this forum. It's unique to your situation, and that's all that can be said. You may need to seek professional support.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
viettdi
Znuny newbie
Posts: 7
Joined: 09 Jan 2013, 18:23
Znuny Version: 3.1.9
Real Name: Luca
Company: IdeaIT

Re: Frequent Apache restarts and duplicate Tickets

Post by viettdi »

First of all, thank you for your answer Crythias.

In my previous posts I've forgotten to say that MySQL replication is now disabled, production server is "isolated" and database duplications happen when user creates a ticket via "New phone ticket" for example, or adding a note to a ticket, not when an external email comes in.

When user clicks on "create" (new ticket phone) this is what happens (don't worry about ids, thy are set 'auto-increment increment = 2' for the replication) :
[Tue Feb 5 12:28:13 2013][Notice][Kernel::System::Ticket::TicketCreate] New Ticket [2013020510000051/Spostamento] created (TicketID=523,Queue=Tecnici di Centrale - Parte Fisica,Priority=3 normal,State=open)
[Tue Feb 5 12:28:21 2013][Notice][Kernel::System::Ticket::TicketCreate] New Ticket [2013020510000061/Spostamento] created (TicketID=525,Queue=Tecnici di Centrale - Parte Fisica,Priority=3 normal,State=open)
Between the two creations there's a "child process exited with status 255 -- restarting" message on error.log.
reneeb
Znuny guru
Posts: 5018
Joined: 13 Mar 2011, 09:54
Znuny Version: 6.0.x
Real Name: Renée Bäcker
Company: Perl-Services.de
Contact:

Re: Frequent Apache restarts and duplicate Tickets

Post by reneeb »

Do you have mod_perl enabled? If so, can you disable it and check if it works then?
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
Locked