Apache - Auto Reload On Changes

bbennett

Active Member
#1
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
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.
 

bbennett

Active Member
#3
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.
 

bbennett

Active Member
#5
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?
 

bbennett

Active Member
#6
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
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?
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
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.
For the second alternative, on cPanel, /scripts/postwwwaccount might be of some use :)
 

bbennett

Active Member
#9
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
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.
/scripts/postwwwacct should do the job actually. You can just add a line to that to restart LSWS.
 
#11
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
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.
I believe it doesn't exist by default, but if you create it, it'll be used.
 
#15
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
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.
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
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.
 
Top