Author |
|
bill_fmicro
Joined: 09 Nov 2007 Posts: 4
|
Posted: Fri 09 Nov '07 2:57 Post subject: Apache 2.2.6 + OpenSSL 0.9.8g - Memory Leak Observed for SSL |
|
|
Hi,
I have noticed that memory usage of httpd.exe grows without bound on a Windows 2003 R2 server when SSL requests are made. When requests on port 80 are made memory does not grow without bound.
On one of these Windows 2003 servers with nearly identical configurations the memory usage of httpd.exe has grown to over 1.4 gigs of usage according to the NT task manager.
The requests are being made to a windows CGI program served using mod_cgi.
The machine experiencing the problem is running Apache 2.2.6 with OpenSSL 0.9.8g DLLs in the bin folder.
Any ideas as to what I can do to resolve this behavior? Has anyone else observed this problem or something similar?
I could provide a minimal archive of the entire setup that is minimal that demonstrates the issue since it appears fairly easy to re-create when running curl scripts to simulate hundreds of CGI requests on demand to make testing more immediate if this would help.
Any and all information that could be provided would be greatly appreciated.
Thank You,
Bill |
|
Back to top |
|
bill_fmicro
Joined: 09 Nov 2007 Posts: 4
|
Posted: Fri 09 Nov '07 23:52 Post subject: WORKAROUND DISCOVERED |
|
|
Hi,
Solution found at URL: http://mail-archives.apache.org/mod_mbox/httpd-bugs/200411.mbox/%3C20041102162850.20065.qmail@nagoya.betaversion.org%3E
I used a curl macro to put our web server under heavy strain, using a MaxRequestsPerChild value of 1000 yielded an httpd.exe that would never exceed 50 MB of usage before another httpd.exe process was started to handle the remaining load and the 50 MB process shut down by Apache.
I ran my test using same versions of software originally noted.
Hopefully this will help someone else out.
--Bill Fisher |
|
Back to top |
|
tdonovan Moderator
Joined: 17 Dec 2005 Posts: 611 Location: Milford, MA, USA
|
Posted: Sat 10 Nov '07 1:11 Post subject: |
|
|
Just curious,
Were you using a dbm: SSLSessionCache, like the post you referred to
- or do you experience this memory leak with a shmcb: cache (the default on Windows)?
-tom- |
|
Back to top |
|
bill_fmicro
Joined: 09 Nov 2007 Posts: 4
|
Posted: Mon 12 Nov '07 23:34 Post subject: Using dbm |
|
|
Hi,
Yes the dbm SSLSessionCache is configured like so in ssl.conf:
SSLSessionCache dbm:logs/ssl_scache
SSLSessionCacheTimeout 300
Do you see something that might prevent a memory leak issue by chance? I'd be very interested in a solution that avoided a memory leak altogether if possible. Although it appears the current solution isn't too bad.
--Bill |
|
Back to top |
|
mallan
Joined: 22 Nov 2007 Posts: 1
|
Posted: Thu 22 Nov '07 14:42 Post subject: Had the same problem |
|
|
I was having the same problem with SSL causing massive memory leak!
When in full swing it would use memory at about 2-5meg/sec until there is none left and it all bombs out.
to solve the problem we changed the:
SSLSessionCache dbm:logs/ssl.scache
to
SSLSessionCache none
Obviously you lose a little performance, but a 3ghz 2gb ram Windows server barely noticed any extra load when dealing with 140requests/sec.
And the RAM no longer gets decimated.
Hope this helps... |
|
Back to top |
|
tdonovan Moderator
Joined: 17 Dec 2005 Posts: 611 Location: Milford, MA, USA
|
Posted: Thu 22 Nov '07 16:04 Post subject: |
|
|
If this is Apache Bug 25667 (also Bug 34039) - then using shared memory cache: SSLSessionCache shmcb:{full_apache_path}/logs/ssl.scache(512000) should also prevent the leak. Do you see this?
-tom- |
|
Back to top |
|
glsmith Moderator
Joined: 16 Oct 2007 Posts: 2268 Location: Sun Diego, USA
|
Posted: Thu 22 Nov '07 18:07 Post subject: |
|
|
Tom, I realize this. I have VC8 on the Vista computer and have the worst luck with it. I also have the iso for VS9 beta. Just haven't burnt it to a disk to give it a whirl. Have been playing with Home Server and Server 2008 instead.
Edit:
3/30/2008 How did this get into this thread?
Last edited by glsmith on Mon 31 Mar '08 5:21; edited 1 time in total |
|
Back to top |
|
daveguitar
Joined: 30 Mar 2008 Posts: 2 Location: Weybridge
|
Posted: Sun 30 Mar '08 21:27 Post subject: apache server problems after upgrade from 2.2.2 to 2.2.8 |
|
|
I had the same problem of apache.exe growing enormously to 800mb at one point after I upgraded from 2.2.2 to 2.2.8
(I did this for security reasons I seem to be a target for frequent hacking attempts.)
The option of setting SSLSessionCache none
solved that problem all I've got to do is sort out
apache.exe taking 80-90% of the CPU resource. |
|
Back to top |
|
daveguitar
Joined: 30 Mar 2008 Posts: 2 Location: Weybridge
|
Posted: Sun 30 Mar '08 21:42 Post subject: Apache CPU hog of resources problem fixed |
|
|
Hey folks,
My problem is solved it was caused by my php setup
I got the latest version from snaps
http://snaps.php.net/win32/php5.2-win32-latest.zip
Now my WinXP system is back to working normal CPU usage
of apache (hardley registering) and now it has sped it all up
my website has stopped stalling from lack of resources. |
|
Back to top |
|