Can't start apache - httpd.conf too many Include

kke

Verified User
Joined
Apr 4, 2006
Messages
198
Location
Thailand
I have a problem on a server with 111 domains
httpd fail to start without any error message!

after checking for a while, I found that in main httpd.conf will included all user's httpd.conf from /usr/local/directadmin/data/users/user/httpd.conf
if I put comment (#) on only 1 line at any "Include" line in the last section of main httpd.conf, httpd can start successfully.

I think apache have a config file size limit at some kb or too many memory for include files.

grep -c Include /etc/httpd/conf/httpd.conf
93
grep -c directadmin /etc/httpd/conf/httpd.conf
88

size of /usr/local/directadmin/data/users/user/httpd.conf approx. 3kb each

CentOS 4.4 i386 + Directadmin 1.292
Dovecot/Apache 2.0.59/php4.4.6/mod_security (4kb of rules)/mod_evasive

Any one know how to solved this ?
 
Hi, kke, please contact me on Skype, MSN or ICQ. I will try to fix that, it's very important to solve this known problem and give a fix to all the community. Thank you.
 
Thanks smtalk for your kind.

But we urgently need to use server for some new domain
then we move an user(not reseller) with 30 domains out
so now we could add new domains without error.

I suspect that the reason may come from memory due to this machine is only 512MB of Ram (another 512MB is take out for claim)

I forgot to try free up some memory last night before remove a 30 domains user, so we still don't know the cause.

I don't think that apache have a maximum virtualhost limit or config filesize limit.
Because many server can running apache with 300+ domains without any problem.
 
No, there is no need to disable error_log. It is and old bug in the customapache script which should be fixed in the new customapache. There should be no problems with the beta version of the customapache.
 
Well I know with all of my servers once I hit a certain number of domains I got the error about too many file descriptors open. I disabled the error_logs because they were not needed for most people. Apache runs fine now. I have some servers with DA that run thousands of domains and I have been running DA since 2005. I have never had the problem described here once I disabled the error_logs and therefore reducing the number of open file descriptors. When I did have error_logs open I did have the exact error described here.

So are you saying that somehow the new customapache script addresses the problem of too many files open? Or even with the new script the possibility of too many files open is still there?
 
floyd, do you still have problems with error_logs? If you uncomment it the problem still occurs? If yes, can I take a look at your server?
 
I will do some testing and get back to you later. I have not used the new customapache script yet so I guess I will have to recompile apache and then enable all the error logs and see what happens.
 
Add us to the list of people who run well over 111 domains with absolutely no problem, using the current (original) CustomApache since it came out.

We've turned off the error logs for several people who've had problems with too many open files, and I can verify that with that removed clients can run thousands of domains (within the resource limitations of the server, of course).

Jeff
 
After add some more domains, the error happen again!
(Memory has been added to 1GB)

I have follow what's floyd said, by remark at the customlog lines in custom template files, then rewrite httpd.conf, YES apache can start now.

By add the remark # at beginning of line will increase the log file size, then filesize limit and memory is not the cause.

How to increase file open limit rather than reduce open files?
(sorry if there are already solution in some link)
 
Since I not plan to have thousand of domain.

I keep custom log for main domain as is.
and change custom log for subdomain to use same file as main domain.

By this way each domain will always use 3 custom log files.
200 domains will use 600 files.


Next box back to FreeBSD :D
 
Back
Top