Unable to view websites due to file limit issue. - Printable Version +- Linux-Noob Forums (https://www.linux-noob.com/forums) +-- Forum: Linux Server Administration (https://www.linux-noob.com/forums/forum-8.html) +--- Forum: LAMP (https://www.linux-noob.com/forums/forum-83.html) +--- Thread: Unable to view websites due to file limit issue. (/thread-1409.html) |
Unable to view websites due to file limit issue. - Slaine - 2007-05-04 When trying to access any web sites or webmail on a plesk server i kept getting the following. Forbidden You don't have permission to access / on this server. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request. I bounced the server but httpd didnt restart. did some digging and it looks like it was a file limit issue, this was the output of ulimit -a core file size (blocks, -c) 0 data seg size (kbytes, -d) unlimited file size (blocks, -f) unlimited max locked memory (kbytes, -l) unlimited max memory size (kbytes, -m) unlimited open files (-n) 1024 pipe size (512 bytes, -p) 8 stack size (kbytes, -s) 8192 cpu time (seconds, -t) unlimited max user processes (-u) 7168 virtual memory (kbytes, -v) unlimited I increased open files limit to 2048 and restarted httpd ok but still couldnt view websites. Checked the error log and found [warn] new file descriptor 1160 is too large; you pro bably need to rebuild Apache with a larger FD_SETSIZE (currently 1024) And now i am stuck were do i go from here and how? Thanks in advance. Unable to view websites due to file limit issue. - znx - 2007-05-04 This isn't a global open file limit issue (hence playing with the kernel won't help), instead its a fixed value inside apache's source. For instance, I have here apache 2.0.58 and checking inside the source: Code: $ grep -ri FD_SETSIZE * So to increase this value you would need to manually edit that file and set it. Then build apache and install from there. You might note that my value is 2048 by default, so maybe simply upgrading your apache to a newer value would help. If you want a hand building apache, just as more. PS: welcome to the forums! Unable to view websites due to file limit issue. - Slaine - 2007-05-04 Thanks for the response and the welcome The os is redhat 9 and the apache version is 2.0.40. I dont have a clue how to rebuild apache, would it affect any existing websites on there or webmail accounts? And yes any help is more than welcome. I've had a load of linux based dns, radius, netsaint and webservers dumped on me to support so i'm having to learn fast :) But i have to admit linux is pretty cool :) Unable to view websites due to file limit issue. - anyweb - 2007-05-04 rh9 is not supported anymore please move to fedora core release 6 (free) or consider another up to date linux os chances are, your issue will go bye bye in the process cheers anyweb Unable to view websites due to file limit issue. - znx - 2007-05-04 Quote:The os is redhat 9 and the apache version is 2.0.40. Hrmm, well its not too old an install of apache but RH9 is very outdated :P So if you have the ability, upgrade the system. Quote:I dont have a clue how to rebuild apache, would it affect any existing websites on there or webmail accounts? Well lets be honest, if it isn't working right now, it can't get any worse? By rights a rebuild of apache, if you install it in a different path, then copy your configuration over, it should "just work" the way it did. Quote:I've had a load of linux based dns, radius, netsaint and webservers dumped on me to support so i'm having to learn fast :) Oh fun! Quote:But i have to admit linux is pretty cool :) [img]<___base_url___>/uploads/emoticons/default_ph34r.png[/img] the linux one! :P You are going to be in a bit of an awkward position, installing from source we would need to know what additional packages options you need (for instance php/python/perl .. or ssl .. or various other options). So do this: Code: apache2ctl -V It will tell us the version and compiled options, here is mine as an example: Code: # apache2ctl -V So hopefully the info you get, will allow us to build an apache that can directly replace your current apache setup but with the minor modification. So in conclusion, What is the options to a complete system replacement with a newer (and thus less bugs)? If that is impossible, then what is your apache setup? Unable to view websites due to file limit issue. - Slaine - 2007-05-05 Here is the version and options info # apachectl -V Server version: Apache/2.0.40 Server built: Nov 27 2003 11:04:06 Server's Module Magic Number: 20020628:0 Architecture: 32-bit Server compiled with.... -D APACHE_MPM_DIR="server/mpm/prefork" -D APR_HAS_SENDFILE -D APR_HAS_MMAP -D APR_HAVE_IPV6 -D APR_USE_SYSVSEM_SERIALIZE -D APR_USE_PTHREAD_SERIALIZE -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT -D APR_HAS_OTHER_CHILD -D AP_HAVE_RELIABLE_PIPED_LOGS -D HTTPD_ROOT="/etc/httpd" -D SUEXEC_BIN="/usr/sbin/suexec" -D DEFAULT_PIDLOG="logs/httpd.pid" -D DEFAULT_SCOREBOARD="logs/apache_runtime_status" -D DEFAULT_LOCKFILE="logs/accept.lock" -D DEFAULT_ERRORLOG="logs/error_log" -D AP_TYPES_CONFIG_FILE="conf/mime.types" -D SERVER_CONFIG_FILE="conf/httpd.conf" The problem is that this is a live server with 850 email accounts on, allthough they are getting by just using pop3 at the moment. Plus the email/webmail/hosting packages are auto setup, i think this server has a indirect odbc connection to one of my hpux servers so when sales add a new customer it is auto setup. I will be building a new server in a month or two but this one needs to be up and running so i can figure out what the hell i'm migrating. :P Plus hopefully i'll know a bit more about linux then as well. Unable to view websites due to file limit issue. - znx - 2007-05-05 Quote:Plus hopefully i'll know a bit more about linux then as well. Lets hope so, ok so .. well it looks a little odd with the HTTPD_ROOT="/etc/httpd" (doesn't that mean your apache is in /etc/httpd ?!?) anyway other than that .. nothing special is there, so lets just do the basic. By the way, I will be doing this "properly", that is we will not be simply installing from source, we will build a RPM and install that :) In preparation put this into a file in ~/.rpmmacros Code: %_topdir %(echo $HOME)/rpmbuild Then continue with this: Code: # mkdir ~/rpmbuild/{RPMS,SOURCES,SPECS,SRPMS,BUILD} Now edit the file that I told you about os/tpf/os.h (or maybe just check that its larger than the 1024 that you seen). Look for the line #define FD_SETSIZE 2048 if it is 2048, then its fine, if its smaller then you need to make it bigger and save the file. IF YOU CHANGE IT, do this: Code: # cd ~/rpmbuild/SOURCES If you haven't changed it, then skip that bit above. OK So next! Code: # cd ~/rpmbuild/SOURCES It should just go away and make a RPM at this point! Lets hope so at least. Once that is done then you should have an RPM you can install. You should BACKUP BACKUP BACKUP, if I haven't made that clear .. backup! hehe. You should do something like this: Code: # tar cvf /root/backup-apache.tar /etc/httpd/ /var/www I don't know your exact layout, nor the size of your setup so you should consider whatever is the most valid method of backup you do. At minimum you should backup the /etc/httpd directory, it will be the configuration of your of your apache (most important). It might also be worthy of hunting for your original apache RPM, that way you can reinstall it if you find this one provides more issues! heh ;) Ok, so if its gone well and built the RPM. To install it you do this (become root first!): Code: # cd ~user/rpmbuild/RPMS/ That is an example, you might find your arch is different and its not i686, so just look for the entry from the ls command. Any assistance, any issues, just ask more questions. Good luck! Unable to view websites due to file limit issue. - Slaine - 2007-05-06 I'll try this on Tuesday when i can get the go ahead to do it. In the meantime i think i will try to build a duplicate system so i can test and learn a bit more in the process. Thanks for the responses they are greatly appreciated. :) |