httpd-DSSL processes not closing, creating HUGE server loads

yaax

Well-Known Member
Jun 15, 2003
67
0
156
Originally posted by jeroman8
You restart apache every 2 minutes ??

That means your websites can't be reached
during 10 seconds every 2 minutes or so.
No, restart take less then 1 second in normal situation and it is really seamless, only on huge server loads it could take few seconds.

Also I tried prm before, but it just killed apache when it was too loaded, but it did not restarted it, so I did simple automatic apache restarts.
 
Last edited:

yaax

Well-Known Member
Jun 15, 2003
67
0
156
I also found better solution, just need to setup in httpd.conf KeepAlive=Off - this really helped a lot to prevent huge loads for apache, even without frequent apache restarts.
However it still problem but now I can do apache restarts each 3-4 minutes.
 
Last edited:

jackal

Well-Known Member
PartnerNOC
Feb 23, 2002
707
0
316
KeepAlive=Off

By turning that off using Rhel 3 your websites images will load slower
 

yaax

Well-Known Member
Jun 15, 2003
67
0
156
Originally posted by jackal
KeepAlive=Off

By turning that off using Rhel 3 your websites images will load slower
May be they will be loaded little slower, but server will work normal and will be stable and reliable. It is not so big price for server stability.
 

jackal

Well-Known Member
PartnerNOC
Feb 23, 2002
707
0
316
That is true the only reason we say that is when we switched to Rhel 3 on some of servers we were getting complains from clients about image loading time and the only way we found to increase the image load time was to turn it on, so I guess it is a double edged sword.
 

netlook

Well-Known Member
Mar 25, 2004
334
0
166
So what is better - turn it off or turn it on? We have Fedora Linux on our servers, and after turning it off the load was bigger than before.
 

yaax

Well-Known Member
Jun 15, 2003
67
0
156
We had no problems with server load on RH 9 and on Fedora - even after latest CPanel upgrade they are working ok.
However I tried to experiment with KeepAlive there but did not found many diiference not on server load nor on pictures loading speeds, also keepalive not always is helped eeven if it is enabled - it is working only with HTTP 1.1 requests
http://httpd.apache.org/docs/mod/core.html#keepalive

Now we installed latest CPanel Edge version on our RHEL server and after keepalive off and after server complete reboot - it started to work normally!! Now server loads are low as normal! No need to restart httpd now.
 

jeroman8

Well-Known Member
Mar 14, 2003
410
0
166
Yaax, do you mind posting here in a few days letting us know if it's till ok ?

My server can be ok for 5-6 days and then it's crazy for 2 days or so...strange.
 

mydomain

Well-Known Member
Aug 10, 2003
138
0
166
Have you optimised your /etc/my.cnf file to stop apache causing high loads or eating the CPU ?

Can you post it here if possible and will be able to see if thats causing an issue with httpd.

TIA
 

jeroman8

Well-Known Member
Mar 14, 2003
410
0
166
Originally posted by mydomain
Have you optimised your /etc/my.cnf file to stop apache causing high loads or eating the CPU ?

Can you post it here if possible and will be able to see if thats causing an issue with httpd.

TIA
Hi, this is mine:

[mysqld]
set-variable = max_connections=300
safe-show-database
 

mydomain

Well-Known Member
Aug 10, 2003
138
0
166
On one of our celerons and P4's we use the following after we had the issues with apache high loads/CPU - may or may not resolve your issue but it resolved ours.


#pico /etc/my.cnf

[mysqld]
max_connections = 300
key_buffer = 16M
myisam_sort_buffer_size = 64M
join_buffer_size = 1M
read_buffer_size = 1M
sort_buffer_size = 1M
table_cache = 1500
thread_cache_size = 128
interactive_timeout = 300
wait_timeout = 300
connect_timeout = 10
max_allowed_packet = 16M
max_connect_errors = 10
query_cache_limit = 1M
query_cache_size = 32M
query_cache_type = 1
skip-innodb

[mysqld_safe]
open_files_limit = 8192

[mysqldump]
quick
max_allowed_packet = 16M

[myisamchk]
key_buffer = 150M
sort_buffer = 64M
read_buffer = 16M
write_buffer = 16M

Also in httpd.conf, setting keepalive to off will slow down image loading, as mentioned before you really dont want to set that to off. You can backup your config file and modify the following in /usr/local/apache/conf/httpd.conf :

#pico /usr/local/apache/conf/httpd.conf

KeepAlive On

MaxKeepAliveRequests 100

KeepAliveTimeout 12

MinSpareServers 10

MaxSpareServers 20

StartServers 2

MaxClients 256

MaxRequestsPerChild 30

It worked on two of our servers with this issue.
 

mydomain

Well-Known Member
Aug 10, 2003
138
0
166
Well the above is set on a P4 2.4 with 1GB Ram and works fine - why dont you try it and see.

TIA
 

netlook

Well-Known Member
Mar 25, 2004
334
0
166
After when my server went to 10 load, I'm affraid of any modifications ...
 

yaax

Well-Known Member
Jun 15, 2003
67
0
156
I am still with the same problem.
But I see how it works now.
After server reboot it worked about 6 hours normally, only after 6 hours it started to make problems and then I was forced to add httpd restarts each 4 minutes.

May be it is making problems only after exceeding some memory limit?
 

mydomain

Well-Known Member
Aug 10, 2003
138
0
166
Originally posted by yaax
I am still with the same problem.
But I see how it works now.
After server reboot it worked about 6 hours normally, only after 6 hours it started to make problems and then I was forced to add httpd restarts each 4 minutes.

May be it is making problems only after exceeding some memory limit?
Restarting HTTPD every 4 minutes isnt a good thing to do long term - have you spoken to your NOC for them to take a look at the server again?
 

yaax

Well-Known Member
Jun 15, 2003
67
0
156
I think I have found solution finally.
I just changed MaxRequestsPerChild setting in httpd.conf from zero to 50. Now I have no problems with Apache processes and server load is normal already almost two days.

Anyway before I had keepalive on and maxrequestsperchild zero and server worked fine, now only after such optimizations it is working normally.
 

mydomain

Well-Known Member
Aug 10, 2003
138
0
166
Originally posted by yaax
I think I have found solution finally.
I just changed MaxRequestsPerChild setting in httpd.conf from zero to 50. Now I have no problems with Apache processes and server load is normal already almost two days.

Anyway before I had keepalive on and maxrequestsperchild zero and server worked fine, now only after such optimizations it is working normally.
I posted above about setting MaxRequestsPerChild to 30 :rolleyes: - I do recommend the other settings provided if possible for less problems.
 

Radio_Head

Well-Known Member
Verifed Vendor
Feb 15, 2002
2,048
1
343
I followed all the instructions here , however the process

/usr/local/apache/bin/httpd -DSSL

is ALWAYS on my process list using top .

:(

Any other suggestion to deactivate ?
/usr/local/apache/bin/httpd -DSSL

Another process very active (always on my top process list sorted by time) is
/usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --us
 

Radio_Head

Well-Known Member
Verifed Vendor
Feb 15, 2002
2,048
1
343
tons of DSSL processes ........

# ps aux | grep DSSL
root 10229 0.0 0.3 7916 3620 ? S Sep23 0:21 /usr/local/apache/bin/httpd -DSSL
nobody 31890 0.0 0.4 9180 4796 ? S 11:30 0:00 /usr/local/apache/bin/httpd -DSSL
nobody 1708 0.0 0.4 8144 4176 ? S 11:42 0:00 /usr/local/apache/bin/httpd -DSSL
nobody 1713 0.0 0.4 8152 4556 ? S 11:42 0:00 /usr/local/apache/bin/httpd -DSSL
nobody 1919 0.0 0.4 8144 4164 ? S 11:43 0:00 /usr/local/apache/bin/httpd -DSSL
nobody 2341 0.0 0.4 8056 4160 ? S 11:45 0:00 /usr/local/apache/bin/httpd -DSSL
nobody 2346 0.0 0.4 8056 4244 ? S 11:45 0:00 /usr/local/apache/bin/httpd -DSSL
nobody 2347 0.0 0.4 8056 4164 ? S 11:45 0:00 /usr/local/apache/bin/httpd -DSSL
nobody 2508 0.0 0.4 8056 4268 ? S 11:46 0:00 /usr/local/apache/bin/httpd -DSSL
nobody 2515 0.0 0.4 8056 4276 ? S 11:46 0:00 /usr/local/apache/bin/httpd -DSSL
nobody 2523 0.0 0.4 8144 4112 ? S 11:46 0:00 /usr/local/apache/bin/httpd -DSSL
nobody 2683 0.0 0.4 8056 4296 ? S 11:47 0:00 /usr/local/apache/bin/httpd -DSSL
nobody 3033 0.0 0.4 8056 4132 ? S 11:49 0:00 /usr/local/apache/bin/httpd -DSSL
nobody 3035 0.0 0.4 8056 4108 ? S 11:49 0:00 /usr/local/apache/bin/httpd -DSSL
nobody 3036 0.1 0.4 8056 4120 ? S 11:49 0:00 /usr/local/apache/bin/httpd -DSSL
nobody 3109 0.0 0.4 8056 4100 ? S 11:50 0:00 /usr/local/apache/bin/httpd -DSSL
nobody 3163 0.0 0.4 8056 4136 ? S 11:50 0:00 /usr/local/apache/bin/httpd -DSSL
nobody 3243 0.0 0.4 8056 4132 ? S 11:50 0:00 /usr/local/apache/bin/httpd -DSSL
nobody 3300 0.0 0.4 8056 4060 ? S 11:50 0:00 /usr/local/apache/bin/httpd -DSSL
nobody 3513 0.0 0.4 8056 4104 ? S 11:52 0:00 /usr/local/apache/bin/httpd -DSSL
nobody 3825 0.1 0.4 8048 4020 ? S 11:54 0:00 /usr/local/apache/bin/httpd -DSSL
nobody 3833 0.0 0.4 8056 4092 ? S 11:54 0:00 /usr/local/apache/bin/httpd -DSSL
nobody 4186 0.2 0.4 8048 4100 ? S 11:56 0:00 /usr/local/apache/bin/httpd -DSSL
nobody 4187 0.0 0.4 8056 4116 ? S 11:56 0:00 /usr/local/apache/bin/httpd -DSSL
nobody 4188 0.1 0.4 8048 3984 ? S 11:56 0:00 /usr/local/apache/bin/httpd -DSSL
nobody 4193 0.0 0.4 8056 4048 ? S 11:56 0:00 /usr/local/apache/bin/httpd -DSSL
nobody 4218 0.0 0.4 8056 4004 ? S 11:56 0:00 /usr/local/apache/bin/httpd -DSSL
nobody 4226 0.2 0.4 8136 4140 ? S 11:56 0:00 /usr/local/apache/bin/httpd -DSSL
nobody 4246 0.0 0.4 8056 4056 ? S 11:56 0:00 /usr/local/apache/bin/httpd -DSSL
nobody 4280 0.0 0.3 8048 3948 ? S 11:57 0:00 /usr/local/apache/bin/httpd -DSSL
nobody 4281 0.1 0.4 8056 4036 ? S 11:57 0:00 /usr/local/apache/bin/httpd -DSSL
nobody 4282 0.1 0.4 8048 4032 ? S 11:57 0:00 /usr/local/apache/bin/httpd -DSSL
nobody 4284 0.0 0.4 8056 4020 ? S 11:57 0:00 /usr/local/apache/bin/httpd -DSSL
nobody 4285 0.0 0.3 8048 3972 ? S 11:57 0:00 /usr/local/apache/bin/httpd -DSSL
nobody 4286 0.0 0.3 8048 3952 ? S 11:57 0:00 /usr/local/apache/bin/httpd -DSSL
nobody 4287 0.0 0.3 8048 3968 ? S 11:57 0:00 /usr/local/apache/bin/httpd -DSSL
nobody 4307 0.0 0.4 8048 4008 ? S 11:57 0:00 /usr/local/apache/bin/httpd -DSSL
nobody 4308 0.0 0.3 8048 3976 ? S 11:57 0:00 /usr/local/apache/bin/httpd -DSSL
nobody 4309 0.0 0.3 8048 3964 ? S 11:57 0:00 /usr/local/apache/bin/httpd -DSSL
nobody 4314 0.1 0.4 8048 4000 ? S 11:57 0:00 /usr/local/apache/bin/httpd -DSSL
nobody 4315 0.2 0.4 8048 4052 ? S 11:57 0:00 /usr/local/apache/bin/httpd -DSSL
nobody 4318 0.0 0.4 8048 4040 ? S 11:57 0:00 /usr/local/apache/bin/httpd -DSSL