Apache - Auto Reload On Changes

Discussion in 'Install/Configuration' started by bbennett, Aug 11, 2007.

  1. bbennett

    bbennett New Member

    Hello,

    Small problem, we are using WHMCS as our cPanel Billing manager. It auto creates accounts using root access. The problem seems to be the "Auto Reload On Changes" feature, as it basically kills the script before it is done creating the cPanel account. If I disable the "Auto Reload On Changes" feature then things work as normal.

    Is there any way to work around this?
  2. medialayer

    medialayer New Member

    From my understanding, the web server should not cause any "downtime" or "timeout" when it reloads...so there might be another issue leading to this.
  3. bbennett

    bbennett New Member

    Yeah, thats what I thought, but in troubleshooting I found if I disable that setting then it works as normal. It seems the apache config reload portion of lsws is causing the problem.

    It is a PHP script that does the work interfacing with cpanel and activating the account/domain, so maybe it is something else, but its weird that it works fine with that setting disabled.
  4. mistwang

    mistwang LiteSpeed Staff

    We will investigate this issue and have it fixed in the 3.2.1 final release.
  5. bbennett

    bbennett New Member

    Thanks, I just tried it under a fresh compile of php4 and still same results as php 5. I also set every timeout I could find in php and lsws to 300 seconds, but still the same issue.

    Do you have an eta on the release?
  6. bbennett

    bbennett New Member

    As a temporary work around does it seem feasible to change the path of the apache conf in lsws to a different and then setup a cron to copy the actual apache conf file to that path ever 3 minutes or so?
  7. David

    David New Member

    That seems like a feasible temporary workaround. Alternatively, if you can edit the script that creates the account, you can have it restart LSWS at the end and just disable the Auto Reload on Changes for now.

    Of course, these are temporary solutions and we should have a permanent fix ready soon with the 3.2.1 release.
  8. medialayer

    medialayer New Member

    For the second alternative, on cPanel, /scripts/postwwwaccount might be of some use :)
  9. bbennett

    bbennett New Member

    Thanks for the help, much appreciated. Unfortunately, I cannot try those alternate options as the whmcs version we have is encoded so it cannot be edited. Ill have to try the cron thing for now.
  10. medialayer

    medialayer New Member

    /scripts/postwwwacct should do the job actually. You can just add a line to that to restart LSWS.
  11. bbennett

    bbennett New Member

    I know that is some cpanel script, but Im not familiar with them. I cant seem to find any info on that one in particular.

    Also, we do not appear to have it on our server.

    -bash: /scripts/postwwwacct: No such file or directory

    I was able to setup a simple cron to run a script. That seems to be working ok for now.

    Appreciate it.
  12. medialayer

    medialayer New Member

    I believe it doesn't exist by default, but if you create it, it'll be used.
  13. bbennett

    bbennett New Member

    You totally lost me. LOL, I don’t know how those scripts work. I would need newb type instructions!
  14. medialayer

    medialayer New Member

    /scripts/postwwwacct is used by cPanel's account creation script /scripts/wwwacct.

    If you create /scripts/postwwwacct you can perform certain tasks. But, by default, it won't be there.

    http://www.cpanel.net/support/docs/hooks.htm#postwww
  15. bbennett

    bbennett New Member

    That looks great, I didnt know about that. The issue I see though is that only runs when an account is created. The way I have it setup I think even if add-on domains are added (which I assume change the httpd.conf) it will be updated within 3 minutes. Or perhaps Im just misunderstanding how the internals work.

    Its working though, so no point in wasting more time on it. Thanks again.
  16. medialayer

    medialayer New Member

    No problem - I personally wouldn't want to restart the web server every 3 minutes, but I suppose it won't do much harm.
  17. bbennett

    bbennett New Member

    Good point. Though Im not sure its restarting every 3 minutes or only if the file actually changes and when trigged by the 3 minutes script. Either way, I have had a large download going for the last 15 minutes or so without being interrupted, so its all good at this point.
  18. bbennett

    bbennett New Member

    Havent tried the new release yet, I just noticed the homepage was updated. Was this fix included?
  19. mistwang

    mistwang LiteSpeed Staff

    It should be addressed in the latest 3.2.1, please give it a try.

Share This Page