httpd crashed and won't restart after adding domains using API


We have a server currently hosting about 475 domains. I ran a home built script that adds domains via the API. This script should have added about 50 more domains.

While the script was running, I received an email letting me know that named and apache had crashed. I cancelled the script and logged in to restart apache and httpd. Named restarted fine but httpd fails to do anything.

The httpd error_log only shows “Unable to open logs”. What did I do and how bad did I mess up?

When you try restarting Apache from the command line (e.g. service apache2 restart on Ubuntu/Debian, or service httpd restart on CentOS), do you get any error messages there? Anything in the syslog (/var/log/syslog or /var/log/messages) afterwards?

I got no error messages but I was able to get the server up and running.

I went into Virtualmin and manually deleted 8 of the recently uploaded domains. After that, httpd successfully restarted. What could cause this behavior?


Yeah in theory you should be able to have any number of domains on your server… it’s tough to know what exactly the problem there might be, it doesn’t sound like the logs had anything particularly helpful.

Do you think you could try re-adding those 8 domains, perhaps one at a time – and restart Apache after each one?

Maybe there’s something about one of those domains that’s triggering a problem of some sort.

You could also look in the logs of that particular domain you’re adding, in $HOME/logs/error_log, for additional log output.


Well, no idea without knowing what was recorded in the logs or having a chance to analyze myself what your script did with the Apache config. As much as I’d like to be, I’m not a fortune teller. :wink: