Forum Moderators: phranque

Message Too Old, No Replies

mod proxy, high CPU usage, and stuck threads

         

gimpadelic

4:34 pm on Feb 25, 2012 (gmt 0)

10+ Year Member



Okay, after a week of struggling to solve this problem, I'm officially pulling my hair out. I may hurt someone ... or myself lol.

Environment:

  • CentOS v5.7
  • httpd v2.2.21 (prefork)
  • mod_proxy_html v3.1


I am trying to configure a simple reverse proxy, and it works great, with one really nasty side effect.

After a thread has completed serving the proxied page, it stays in a "sending reply" (W) state, according to Apache's /server-status. The CPU spirals out of control the more requests are made, as those stuck threads start piling up. At one point, load average was over 85.0 :( I have to restart the httpd service to reset things (which is every few minutes lol). I'm the only user on the box :)

I've tried all sorts of things - for example:

ProxyPass /SomeDir/ http://OtherLocation/SomeDir/ disablereuse=on


But nothing changes. The threads stay stuck, spinning, and sucking down CPU cycles until I reset Apache. They don't time out or eventually clear up. Checking netstat doesn't reveal any spinning sockets either ... which is weird.

If I comment out the ProxyPass line, Apache runs fine, so I definitely feel like its a mod_proxy issue here. I enabled debug logging for both httpd and mod_proxy but I don't see any errors.

Any ideas?

Thanks in advance!

gimpadelic

7:14 pm on Feb 25, 2012 (gmt 0)

10+ Year Member



Actually, I think I've narrowed it down even further - it looks like a mod_proxy_html issue. I just don't know what specifically, but if I comment out ProxyHTMLEnable the processes don't hang.