Apache 2.2.11 and "Allow service to interact with desktop"

Discussion in 'Apache' started by Deprecated, Nov 13, 2009.

  1. #1
    Hello:

    I have a weird problem with Apache and Windows 2003 Server that I haven't been able to find out:

    HP Proliant DL580 G5
    Windows Server 2003 R2 Standard x64
    Apache 2.2.11

    With that configuration, if I double-click "My PC", "Manage" and I go to "Disk manage", an error is given: "Unable to connect to logical disk manager"

    The weird thing is that if I check the "Allow service to interact with desktop" checkbox in the properties of the Apache2.2 service, the problem is solved. ¿? The new problem now is that when connecting to the machine via Terminal Server with the /console parameter, a lot of cmd windows appear, due to the rotatelogs.

    I hope someone could give me some clue about the dependencies between Apache and Logical disk manager, and/or an alternative to rotatelog.exe, in order to eliminate those annoying cmd windows. I tried mod_log_rotate but it didn't work properly with the error log.

    Thank you very much.
     
    Deprecated, Nov 13, 2009 IP
  2. Deprecated

    Deprecated Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I tried with the last httpd.exe (2.2.14) and I had the same problem: I had to check the "Allow service to interact with desktop" checkbox in the properties of the Apache2.2 service in order to get the Logical disk manager working.
     
    Deprecated, Nov 16, 2009 IP
  3. Deprecated

    Deprecated Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    We found the problem.

    We have a lot of virtual hosts, which are launching a lot of rotatelog.exe processes, which are consuming so much memory that the desktop heap is getting exhausted. About desktop heap:

    http://blogs.msdn.com/ntdebugging/archive/2007/01/04/desktop-heap-overview.aspx

    By default, it seems that Windows 2003 Server x64 allows 768 KB for the desktop heap associated with the non-interactive processes, and 20480 KB for the desktop heap associated with the interactive processes. This way, by allowing Apache to interact with the desktop, what we are really achieving is giving more memory to the rotatelog.exe processes to consume. Desktop heap is not exhausted and the problems are gone. Of course, the problem is that this way we see a lot of cmd windows in the desktop, because now they "are" interactive. The real solution is changing the following registry value:

    HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\SubSystems\Windows

    The default data for this registry contains:

    SharedSection=1024,20480,768

    The second value is for interactive processes, and the third value is for the non-interactive processes, so we have to increase the third value.

    Desktop heap can be monitorized with Microsoft's Desktop Heap Monitor:

    http://www.microsoft.com/downloads/details.aspx?familyid=5CFC9B74-97AA-4510-B4B9-B2DC98C8ED8B&displaylang=en#RelatedDownloads

    I hope this will help someone else.

    Best regards.
     
    Deprecated, Nov 19, 2009 IP