if i reload apache (graceful) the apache prozesses consumes additional 8kB for each VirtualHost-Definition! this is independant if i define workers or not. With 1000 VirtualHost for example, each apache process consumes on every reload additional 8MB memory if i remove "LoadModule jk_module modules/mod_jk.so" everything is ok again. i have installed apache 2.0.58 and tried with mod_jk 1.2.22/23 and 25 , but all have same problem
Could you please tell us your platform? Did you also try with httpd 2.2? It's likely the bug doesn't depend on these details, but one never knows. Thanks for reporting this!
no, i have not tried with apache 2.2 platform is Gentoo 4.1.2(In reply to comment #1)
I could not really reproduce this. I tried with httpd 2.2 on Solaris. I can see a memory leak after each restart, but even without mod_jk. Could you please post your test config (OK if httpd 2.0)? Maybe you are able to produce a "minimal" config. How do you measure the leak? Are you looking at the memory map in the proc filesystem entry of an httpd child process?
Aha, can reproduce now. My httpd config leaks some memory even without mod_jk, but it's only a small amount and it doesn't go up with the number of virtual servers. I tried again with 200 vhosts, and now I can see the mod_jk specific problem.
Can you confirm, that the problem only happens, if the vhosts have no individual JK configuration? I.e. as soon as you add an individual JkLogFile or an individual JkMount to each host, then there is no restart leak. If this is the case, I now know the cause of th eproblem and will think about the right way of fixing it.
Yes! i could only make a short test, but you are right. with individual JK configuration it seems to be ok
I committed a fix. It's a little late now for me for final tests but I would appreciate, if you could give the fix a try. I put a new tarball under http://people.apache.org/~rjung/mod_jk-dev/ You can build this version exactly like an official release. The contents of the tarball is the latest mod_jk code from the code repository (subversion).
Hi Rainer! Yes, looks great! problem solved! thank you very much !
... and in case you really need many virtual servers without any JK in them, you can save some memory with the global option JkMountCopy All This will have the side effect, to enable all JkMounts which are defined in the global server in the virtual servers too. But in case you only use JK in some/few virtual servers, you can define your JKMounts in those virtual servers and set JkMountCopy All in the global. Then all the virtual servers that have no JkMounts will share the same config element, saving about 8KB per virtual server. I'm closing this issue, thanks again for reporting. If you find a problem with the fix later, you can reopen the issue. Fix will be part of 1.2.26, maybe sometime in November.
If you have some spare cycles: we needed to apply some changes to this fix. It would be good to know, that the updated dev snapshot found at http://people.apache.org/~rjung/mod_jk-dev/ still is OK for you.