Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 4th October 2009, 00:34
gkovacs gkovacs is offline
Member
 
Join Date: Jan 2009
Location: Budapest, Hungary
Posts: 47
Thanks: 5
Thanked 0 Times in 0 Posts
Default ISPConfig 3.0.1.4 causes Apache to have too many open files

We have encountered a very weird error after installing ISPConfig 3.0.1.4.
Basically it causes Apache/mod_php to create thousands of open files (actually FIFO pipes), and they are staying open until the system runs out.

REFERENCE
On our production servers running ISPConfig 3.0.1.3, lsof |wc-l shows 2-5000 open files, and if traffic is declining this number decreases fast, no problem there.
On newly installed servers with 3.0.1.3, there is no problem.

ERROR
Ou our newly installed server with 3.0.1.4, after clicking through the web interface a couple of times (and maybe some PHPMyAdmin pages as well, to increase load a bit), lsof shows a growth to 10-20000 open files in a minute, and they never close.
After a couple of minutes, the web server slows to a halt and PHP pages do not load anymore.

ENVIRONMENT
We have tested this on several different (freshly installed) servers:

- Ubuntu 8.04 with perfect server setup (OpenVZ)
Apache/2.2.8 (Ubuntu) PHP/5.2.4-2ubuntu5.7

- Debian 5 with perfect server setup (OpenVZ)
Apache/2.2.9 (Debian) PHP/5.2.6-1

The only difference is that on Debian, restarting apache actually closes the open files, while on Ubuntu they are kept open even then.
Reply With Quote
Sponsored Links
  #2  
Old 4th October 2009, 16:00
damir damir is offline
Senior Member
 
Join Date: Jun 2006
Posts: 375
Thanks: 11
Thanked 51 Times in 42 Posts
Default

This could be related to OpenVZ, beacuse i can't reproduce it on non vps server and on esxi vps. I'm running multi server setup (ispconfig 3.0.1.4) on debian 5.0.3.
Reply With Quote
  #3  
Old 5th October 2009, 12:45
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,482
Thanks: 835
Thanked 5,524 Times in 4,345 Posts
Default

I'am also not able to reproduce this on my servers. Also the ispconfig interface is basically a normal php script, it is not able to keep files open.

Maybe you use fcgi and have a high number of fcgi children configured. Check the server settings and set fcgi children to 1. You will have to open the settings of your website(s), cahnge a value and and save it to update this setting for a site.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #4  
Old 5th October 2009, 14:27
gkovacs gkovacs is offline
Member
 
Join Date: Jan 2009
Location: Budapest, Hungary
Posts: 47
Thanks: 5
Thanked 0 Times in 0 Posts
Default

First of all, I'm not using FCGI (it's not even installed).
Second, there are no sites, only one that has PHPMyAdmin installed under it for the testing.
Third, the problem does not manifest itself until ISPConfig 3.0.1.4 has been installed.

Basically, the ONLY DIFFERENCE between the working and the problematic server is the version of ISPConfig installed.

This is what I do for every VPS on the host (needed for Pure-FTPD):
Code:
cat >vpscap.sh
VPSID=XXX
for CAP in CHOWN DAC_READ_SEARCH SETGID SETUID NET_BIND_SERVICE NET_ADMIN SYS_CHROOT SYS_NICE CHOWN DAC_READ_SEARCH SETGID SETUID NET_BIND_SERVICE NET_ADMIN SYS_CHROOT SYS_NICE
do
  vzctl set $VPSID --capability ${CAP}:on --save
done

chmod +x vpscap.sh
./vpscap.sh
And here is what I do before installing ISPConfig:
Code:
apt-get update
apt-get dist-upgrade
apt-get install mc psmisc wget man ftp lsof

apt-get install mysql-client openssl apache2 apache2.2-common apache2-doc apache2-mpm-prefork apache2-utils libexpat1 ssl-cert libapache2-mod-php5 php5 php5-common php5-gd php5-mysql php5-imap php5-cli
a2enmod suexec rewrite ssl include actions
/etc/init.d/apache2 restart

modprobe capability
echo 'capability' >> /etc/modules
apt-get install pure-ftpd-common pure-ftpd-mysql quota quotatool
echo 'yes' > /etc/pure-ftpd/conf/DontResolve
echo '50000 10' > /etc/pure-ftpd/conf/LimitRecursion

apt-get install vlogger webalizer cron
Are there any Apache or vhost configuration differences between 3.0.1.3 and 3.0.1.4?
Reply With Quote
  #5  
Old 6th October 2009, 12:30
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,482
Thanks: 835
Thanked 5,524 Times in 4,345 Posts
Default

Quote:
Are there any Apache or vhost configuration differences between 3.0.1.3 and 3.0.1.4?
No, nothing has changed in this area.

Please run:

ps aux

and check if you have a high number of php processes.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #6  
Old 7th October 2009, 05:37
ezhandossov ezhandossov is offline
Junior Member
 
Join Date: Oct 2009
Location: Almaty, Kazakhstan
Posts: 7
Thanks: 1
Thanked 0 Times in 0 Posts
Send a message via ICQ to ezhandossov
Default

Quote:
Originally Posted by damir View Post
This could be related to OpenVZ, beacuse i can't reproduce it on non vps server and on esxi vps. I'm running multi server setup (ispconfig 3.0.1.4) on debian 5.0.3.
Hi! I think I have same problem, but on real server - single server setup (ISPConfig 3.0.1.4) on Debian Lenny.

Problem occurs after some time of working in control panel (if i don't use it everything works fine).

Problem is php get error "Failed to open stream. Too many open files..." while file-nr is about 1000 times smaller than file-max.
Reply With Quote
  #7  
Old 7th October 2009, 09:19
damir damir is offline
Senior Member
 
Join Date: Jun 2006
Posts: 375
Thanks: 11
Thanked 51 Times in 42 Posts
Default

Are you both running single server or multi server setups?

I'm running multi server setup, with the interface on a signle server and lsof | wc -l stays between 2100 - 2500. I will keep my eye on it during the day to see if it grows.
Reply With Quote
  #8  
Old 7th October 2009, 15:21
ezhandossov ezhandossov is offline
Junior Member
 
Join Date: Oct 2009
Location: Almaty, Kazakhstan
Posts: 7
Thanks: 1
Thanked 0 Times in 0 Posts
Send a message via ICQ to ezhandossov
Default

Quote:
Originally Posted by damir View Post
Are you both running single server or multi server setups?
I'am new to ISPconfig so I don't clearly undestand this question. If you mean that all SW servers (apache, mysql etc.) runing on the same HW server (PC) than YES I running single server setup. If you mean something different, please explain.

P.S. sorry for my english
Reply With Quote
  #9  
Old 8th October 2009, 11:46
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,482
Thanks: 835
Thanked 5,524 Times in 4,345 Posts
Default

Please post the output of:

ps aux | grep php
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #10  
Old 10th October 2009, 15:20
ezhandossov ezhandossov is offline
Junior Member
 
Join Date: Oct 2009
Location: Almaty, Kazakhstan
Posts: 7
Thanks: 1
Thanked 0 Times in 0 Posts
Send a message via ICQ to ezhandossov
 
Default

Quote:
Originally Posted by till View Post
Please post the output of:

ps aux | grep php
There is nothing except GREP itself
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Install a Comodo InstantSSL Certificate for ISPconfig Apache, Postfix, Imap & Pop gwa7 Tips/Tricks/Mods 1 30th September 2009 19:08
The system is currently updating the configuration files. warlock General 8 21st February 2009 19:15
Open Ports Salam Installation/Configuration 1 7th February 2008 12:31
Apache won't start: "Too many files error"? bpmee Server Operation 4 31st July 2007 14:37
ispconfig apache configuration it0007 Installation/Configuration 5 15th November 2006 14:34


All times are GMT +2. The time now is 14:24.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.