The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

how to disable Apache restart after account creation?

Discussion in 'EasyApache' started by dendis, Sep 17, 2007.

  1. dendis

    dendis Well-Known Member

    Joined:
    Jul 18, 2003
    Messages:
    49
    Likes Received:
    0
    Trophy Points:
    6
    We are running cpanel based free hosting service and each day we add around 200 account and remove over 100 inactive accounts.

    each time account is created/removed apache must be restarted by safeapacherestart
    As far there are over 3000 accounts on server it takes about 30 seconds for apache restart to be completed. And during restart web server is not accessible. So once you do this 300 times a day you get a big non technical downtime :(

    Is there any way to disable apache restart after account creation/termination?
    We would restart apache once per hour by cron. I also understand that new account will not work until apache is not restarted, but its not a problem.

    Thank in advance for any suggestions!
     
  2. dendis

    dendis Well-Known Member

    Joined:
    Jul 18, 2003
    Messages:
    49
    Likes Received:
    0
    Trophy Points:
    6
    So, any ideas ?

    At least where it is possible to modify account creation/termination functions?
    /scripts/killacct dowas have any options to modify, it just executes
    my ( $status, $result, $output ) = Whostmgr::Accounts::Remove::_removeaccount( 'user' => $user, 'keepdns' => $keepdns );

    but where to see that function?
     
  3. djbob2

    djbob2 Well-Known Member

    Joined:
    May 14, 2005
    Messages:
    100
    Likes Received:
    0
    Trophy Points:
    16
    Apache restart should be seamless; ie., your server being down for 30 seconds shouldn't be happening. I have about 1000 accounts on my server, and the restart is still seamless and takes around three seconds (during which httpd is still online). My server is a Pentium 4... not too new. What server do you have, and what are you running on it?
     
  4. ToddShipway

    ToddShipway Well-Known Member

    Joined:
    Nov 13, 2006
    Messages:
    300
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Houston, TX
    You should be able to add the line below to /ect/wwwacct.conf to disable it.

    Code:
    RESTARTAPACHE n
    This will allow you to disable apache restarts during account creation without editing any scripts.
     
    #4 ToddShipway, Sep 23, 2007
    Last edited: Sep 23, 2007
  5. darklca

    darklca Member

    Joined:
    Jul 10, 2007
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    not working

    WHM 11.11.0 cPanel 11.15.0-R17853
    FREEBSD 6.2-STABLE i386 on standard - WHM X v3.1.0

    apache still restarts after kill/add account


    ---

    where can i hash restart apache on add/delete account ?
     
    #5 darklca, Nov 7, 2007
    Last edited: Nov 7, 2007
  6. darklca

    darklca Member

    Joined:
    Jul 10, 2007
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    if ( $rstapache ne "n" ) {
    $output .= Whostmgr::UI::setstatus("Restarting apache");
    Cpanel::HttpUtils::safeaprestart();
    $output .= Whostmgr::UI::setstatusdone();
    }

    ok everyone who have big number of accounts should modify

    Accounts/Remove.pm and sure that there is too in Create.pm
    or just hash the restart in Remove, the RESTARTAPACHE in wwwacct.conf work but only for Create.pm, if you want you can add from Create.pm loadwwwacct conf function reffer to it and put restart like this in upper.

    --- update :) whm dont show that he is restart apache, but it is still restarted... lol.. who code this ? what for ? 1000 of restart in creating/deleting account ? sick.
    is there any man here who succeded to delete all instance of restarting apache on creating/deleteing accounts ?
     
    #6 darklca, Nov 7, 2007
    Last edited: Nov 7, 2007
  7. dendis

    dendis Well-Known Member

    Joined:
    Jul 18, 2003
    Messages:
    49
    Likes Received:
    0
    Trophy Points:
    6
    well simply upgrade to apache 2.2
    no matter how much accounts you have - apache 2.2 takes only 1-2 seconds to start/restart

    of course such option in wwwacct.conf would be also great
     
Loading...

Share This Page