Hello,
We just upgraded subversion from 1.7 to 1.8 and noticed that the process httpd.exe takes 100% and maxes the box and we have to keep killing the httpd.exe, are you aware of this problem?
Regards,
Dinesh Hirani
12 St James’s Square
London
SW1Y 4LB
Tel: 020 3480 6572
Hello Pavel,
Answer is in red below
-----Original Message-----
From: Pavel Lyalyakin [mailto:pavel.l...@visualsvn.com]
Sent: 04 July 2013 16:19
To: us...@subversion.apache.org; Dinesh Hirani
Subject: Re: Subversion 1.8 httpd.exe taking 100% CPU
Hello Dinesh,
> We just upgraded subversion from 1.7 to 1.8 and noticed that the process httpd.exe takes 100% and maxes the box and we have to keep killing the httpd.exe, are you aware of this problem?
* What's your environment (svn client / server / Apache HTTP Server version)?
We using TortoiseSVN 1.8 / CollabNet Edge / Apache HTTP Server version 2.4.4
* What exactly do you do when the httpd.exe starts to consume 100% CPU time?
We don’t know exactly what causes it because nothing is written to any logs as far we can see, however once we kill the httpd.exe then it’s find for another couple of hours.
* Any related events on the server log?
Error log
Last message logged. Then at 9.35 I killed httpd.exe
[Thu Jul 04 09:24:49.798629 2013] [authz_svn:error] [pid 4844:tid 892] [client 10.9.11.84:56153] Access denied: 'bparker' OPTIONS risk-dev:/Build/trunk/RabbitMQ
[Thu Jul 04 09:35:45.690450 2013] [mpm_winnt:notice] [pid 4204:tid 480] AH00428: Parent: child process 4844 exited with status 4294967295 -- Restarting.
Subversion log
Last message logged. Then at 9.35 I killed httpd.exe
[04/Jul/2013:09:33:52 +0100] svc-teamcity Risk-DEV log (/) r41581:41690 discover-changed-paths revprops=all 0
[04/Jul/2013:09:35:02 +0100] svc-teamcity Risk-DEV log (/) r41581:41690 discover-changed-paths revprops=all 0
--
With best regards,
Pavel Lyalyakin
VisualSVN Team
* What's your environment (svn client / server / Apache HTTP Server version)?
We using TortoiseSVN 1.8 / CollabNet Edge / Apache HTTP Server version 2.4.4
* What exactly do you do when the httpd.exe starts to consume 100% CPU time?
We don’t know exactly what causes it because nothing is written to any logs as far we can see, however once we kill the httpd.exe then it’s find for another couple of hours.
I did not find a solution however I wrote an monitor application that checks if the httpd.exe process hits 100%, if so I KILL the process and CollabNet then restarts another instance.
From: valentij...@gmail.com [mailto:valentij...@gmail.com]
Sent: 19 August 2013 16:37
To: subversi...@googlegroups.com
Cc: Pavel Lyalyakin; us...@subversion.apache.org; Dinesh Hirani
Subject: Re: Subversion 1.8 httpd.exe taking 100% CPU
> We just upgraded subversion from 1.7 to 1.8 and noticed that the process httpd.exe takes 100% and maxes the box and we have to keep killing the httpd.exe, are you aware of this problem?
Decura IM LLP is authorised and regulated by the Financial Conduct Authority. Registered office address: 11-12 St James’s Square, London SW1Y 4LB. Registered in England and Wales: OC375344
Decura LLP is authorised and regulated by the Financial Conduct Authority. Registered office address: 11-12 St James’s Square, London SW1Y 4LB. Registered in England and Wales: OC377231
I did not find a solution however I wrote an monitor application that checks if the httpd.exe process hits 100%, if so I KILL the process and CollabNet then restarts another instance.
I’ve included the my main class that does the work, you can wrap it around the windows service. Call the start method when the service starts and call the dispose method when the service stops.
The code below binds to the httpd.exe PID and monitor the CPU load, once it hits 99% or greater than I KILL that PID. CollabNet will restart it automatically.
public class Manager : IDisposable
{
readonly ILog _log;
#region Constructor / Deconstructor
/// <summary>
/// Initializes a new instance of the <see cref="Manager" /> class.
/// </summary>
public Manager()
{
_log = LogManager.GetLogger(typeof(Manager));
}
/// <summary>
/// Finalizes an instance of the <see cref="Manager" /> class.
/// </summary>
~Manager()
{
Dispose(false);
}
#endregion
/// <summary>
/// Starts this instance.
/// </summary>
public void Start()
{
try
{
// now monitor these
WorkingThread = new Thread(() =>
{
while (!IsExit)
{
var httpdProcesses = Process.GetProcessesByName("httpd");
foreach (var httpdProcess in httpdProcesses)
{
if (GetCpuPercentById(httpdProcess.Id) >= 99)
{
try
{
_log.InfoFormat("Killing PID {0}", httpdProcess.Id);
httpdProcess.Kill();
_log.InfoFormat("Killed PID {0}", httpdProcess.Id);
}
catch (Exception ex)
{
_log.Warn(ex.Message, ex);
}
}
}
Thread.Sleep(100);
}
});
WorkingThread.Start();
}
catch (Exception ex)
{
_log.WarnFormat("Failed to process because {0}", ex.Message);
}
}
private int GetCpuPercentById(int pid)
{
PerformanceCounter pc = new PerformanceCounter("Process", "% Processor Time",
GetPerformanceCounterProcessName(pid), true);
pc.NextValue();
Thread.Sleep(1000);
int cpuPercent = (int) pc.NextValue() / Environment.ProcessorCount;
return cpuPercent;
}
private string GetPerformanceCounterProcessName(int pid)
{
return GetPerformanceCounterProcessName(pid, System.Diagnostics.Process.GetProcessById(pid).ProcessName);
}
private string GetPerformanceCounterProcessName(int pid, string processName)
{
int nameIndex = 1;
string value = processName;
string counterName = processName + "#" + nameIndex;
PerformanceCounter pc = new PerformanceCounter("Process", "ID Process", counterName, true);
while (true)
{
try
{
if (pid == (int) pc.NextValue())
{
value = counterName;
break;
}
else
{
nameIndex++;
counterName = processName + "#" + nameIndex;
pc = new PerformanceCounter("Process", "ID Process", counterName, true);
}
}
catch (SystemException ex)
{
if (ex.Message == "Instance '" + counterName + "' does not exist in the specified Category.")
{
break;
}
else
{
throw;
}
}
}
return value;
}
public bool IsExit { get; set; }
private Thread WorkingThread;
#region IDisposable
private bool _disposed;
/// <summary>
/// Releases unmanaged and - optionally - managed resources.
/// </summary>
/// <param name="disposing"><c>true</c> to release both managed and unmanaged resources; <c>false</c> to release only unmanaged resources.</param>
protected virtual void Dispose(bool disposing)
{
if (!_disposed)
{
if (disposing)
{
// Dispose managed resources.
IsExit = true;
if (WorkingThread != null)
{
WorkingThread.Join();
WorkingThread = null;
}
}
// There are no unmanaged resources to release, but
// if we add them, they need to be released here.
}
_disposed = true;
}
/// <summary>
/// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
/// </summary>
public void Dispose()
{
Dispose(true);
GC.SuppressFinalize(this);
}
#endregion
}
From: valentij...@gmail.com [mailto:valentij...@gmail.com]
Sent: 20 August 2013 09:21
To: subversi...@googlegroups.com
Cc: valentij...@gmail.com; Pavel Lyalyakin; us...@subversion.apache.org; Dinesh Hirani
Subject: Re: Subversion 1.8 httpd.exe taking 100% CPU
On Monday, August 19, 2013 5:41:55 PM UTC+2, Dinesh Hirani wrote:
On Tue, Aug 20, 2013 at 12:20 PM, <valentij...@gmail.com> wrote:
> On Monday, August 19, 2013 5:41:55 PM UTC+2, Dinesh Hirani wrote:
>>
>> I did not find a solution however I wrote an monitor application that
>> checks if the httpd.exe process hits 100%, if so I KILL the process and
>> CollabNet then restarts another instance.
Hello Pavel,
Any update on this issue as the bug still exists?
From: Dinesh
Hirani
Sent: 04 July 2013 16:30
To: 'Pavel Lyalyakin'; us...@subversion.apache.org
Subject: RE: Subversion 1.8 httpd.exe taking 100% CPU
Hello Pavel,
Answer is in red below
-----Original Message-----
From: Pavel Lyalyakin [mailto:pavel.l...@visualsvn.com]
Sent: 04 July 2013 16:19
To: us...@subversion.apache.org; Dinesh Hirani
Subject: Re: Subversion 1.8 httpd.exe taking 100% CPU
Hello Dinesh,
> We just upgraded subversion from 1.7 to 1.8 and noticed that the process httpd.exe takes 100% and maxes the box and we have to keep killing the httpd.exe, are you aware of this problem?
* What's your environment (svn client / server / Apache HTTP Server version)?
We using TortoiseSVN 1.8 / CollabNet Edge / Apache HTTP Server version 2.4.4
* What exactly do you do when the httpd.exe starts to consume 100% CPU time?
We don’t know exactly what causes it because nothing is written to any logs as far we can see, however once we kill the httpd.exe then it’s find for another couple of hours.
* Any related events on the server log?
Error log
Last message logged. Then at 9.35 I killed httpd.exe
[Thu Jul 04 09:24:49.798629 2013] [authz_svn:error] [pid 4844:tid 892] [client 10.9.11.84:56153] Access denied: 'bparker' OPTIONS risk-dev:/Build/trunk/RabbitMQ
[Thu Jul 04 09:35:45.690450 2013] [mpm_winnt:notice] [pid 4204:tid 480] AH00428: Parent: child process 4844 exited with status 4294967295 -- Restarting.
Subversion log
Last message logged. Then at 9.35 I killed httpd.exe
[04/Jul/2013:09:33:52 +0100] svc-teamcity Risk-DEV log (/) r41581:41690 discover-changed-paths revprops=all 0
[04/Jul/2013:09:35:02 +0100] svc-teamcity Risk-DEV log (/) r41581:41690 discover-changed-paths revprops=all 0
--
With best regards,
Pavel Lyalyakin
VisualSVN Team
Hello Pavel,
Do you know when this issue will be fix?
On 8/20/13 3:15 AM, Ivan Zhakov wrote:Note there was another similar thread on this here:
> But from what I see process is stuck in
> libaprutil-1.dll!000000007489fc50(), given the last message in debug
> log is "auth_ldap authenticate: using URL" it most likely problem with
> communication with LDAP server (ldap protocol implemented in
> libapr-util). It could be misconfiguration or bug in libapr-util.
https://mail-archives.apache.org/mod_mbox/subversion-users/201311.mbox/%3CCEB51A88.2B46A%25davek%40gamehouse.com%3E
I came to the conclusion that there was an LDAP problem as well.
Things that would be interesting to know is if the httpd version changed along
with the Subversion version or if httpd was left alone and only Subversion was
updated.