Chris Faust wrote:
Hi,
We have been having some problems where all of a sudden apache will start logging the error of:
[error] mod_perl: $r->read failed to read
Multiple times (100s in less then 10th of a sec), often it will get to the point where load on the machine goes through the roof and apache has problems responding and it appears to be the number of requests that are happening as limits that shouldn't be reached like DB connections and apache processes are maxing out during non-peak hours.
From what we could see it looked like someone outside was sending all kind of linefeeds and whatnot within the URL which was documented in the Apache 45 release which we did update - now we are down to getting the above mod_perl error and shortly after that starts all hell breaks loose.
Nowhere in our code do we directly call the "read" method nor can I find anything relating to the error so I'm a little lost on what I can do.
Any ideas?

You probably use CGI.pm or something else that calls $r->read(). This happends in xs/Apache/RequestIO/Apache__RequestIO.h (hint grep the mod_perl source code):


                /*
                 * XXX: as stated in ap_get_client_block, the real
                 * error gets lots, so we only know that there was one
                 */
                ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
                         "mod_perl: $r->read failed to read");
                break;

As you can see from the comment due to a bad implementation of ap_get_client_block in Apache, the error is not available. I'm planning to rewrite all these functions to get rid of ap_get_client_block, and work with bucket brigades instead.

In any case that won't solve the problem that you are seeing, I'd dig in Apache. e.g. trying to use mod_cgi (which doesn't use ap_get_client_block) to reproduce the problem and ask at the httpd list.

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com



Reply via email to