Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Apache: Dev

mod_proxy problem with APC on the backend

 

 

Apache dev RSS feed   Index | Next | Previous | View Threaded


william.leonard at lxcenter

Apr 7, 2012, 3:58 PM

Post #1 of 4 (315 views)
Permalink
mod_proxy problem with APC on the backend

With a light httpd worker front end as a reverse proxy to a mod_php backend everything works fine, until I enable APC for PHP on the backend. If I use wget to make a request to the backend directly, it works fine. If I restart the httpd backend, it works for one request from the light side, then fails with:

Proxy Error
The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request GET /test.php.
Reason: Error reading from remote server

Logs show:
[Sat Apr 07 10:09:02 2012] [error] [client 10.9.8.7] (70014)End of file found: proxy: error reading status line from remote server 127.0.0.1:8080
[Sat Apr 07 10:09:02 2012] [error] [client 10.9.8.7] proxy: Error reading from remote server returned by /test.php

Is this similar to your bug report? http://mail-archives.apache.org/mod_mbox/httpd-dev/201201.mbox/%3C4F25B7B3.6050703 [at] kippdata%3E

You can see my full config without the actual vhost here: https://github.com/shazarlx/kloxo/tree/httpd-light_2/kloxo/file/httpd-light

The vhost contains:
<IfDefine light>
ProxyPassReverse / http://127.0.0.1:8080/
RewriteEngine on
RewriteCond %{REQUEST_URI} .*\.(php)$
RewriteRule ^/(.*) http://127.0.0.1:8080/$1 [P]
</IfDefine>

Also I've switched the heavy side to prefork from itk but still the same results.

-Will


william.leonard at lxcenter

Apr 7, 2012, 4:21 PM

Post #2 of 4 (301 views)
Permalink
Re: mod_proxy problem with APC on the backend [In reply to]

Actually since I found that restarting the heavy side let it work once, I focused more on that and the second time I do wget I get:

--2012-04-07 19:14:25-- (try:11) http://example.com:8080/test.php
Connecting to example.com|127.0.0.1|:8080... connected.
HTTP request sent, awaiting response... No data received.
Retrying.

It did that 11 times until I canceled it.

Also in the global logs I now see:

[Sat Apr 07 19:21:15 2012] [notice] child pid 32687 exit signal Segmentation fault (11)
[Sat Apr 07 19:21:16 2012] [notice] child pid 2378 exit signal Segmentation fault (11)
[Sat Apr 07 19:21:19 2012] [notice] child pid 2379 exit signal Segmentation fault (11)
[Sat Apr 07 19:21:20 2012] [notice] child pid 2381 exit signal Segmentation fault (11)
[Sat Apr 07 19:21:33 2012] [notice] child pid 2382 exit signal Segmentation fault (11)

-Will
----- Original Message -----
From: Will
To: dev [at] httpd
Sent: Saturday, April 07, 2012 6:58 PM
Subject: mod_proxy problem with APC on the backend


With a light httpd worker front end as a reverse proxy to a mod_php backend everything works fine, until I enable APC for PHP on the backend. If I use wget to make a request to the backend directly, it works fine. If I restart the httpd backend, it works for one request from the light side, then fails with:

Proxy Error
The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request GET /test.php.
Reason: Error reading from remote server

Logs show:
[Sat Apr 07 10:09:02 2012] [error] [client 10.9.8.7] (70014)End of file found: proxy: error reading status line from remote server 127.0.0.1:8080
[Sat Apr 07 10:09:02 2012] [error] [client 10.9.8.7] proxy: Error reading from remote server returned by /test.php

Is this similar to your bug report? http://mail-archives.apache.org/mod_mbox/httpd-dev/201201.mbox/%3C4F25B7B3.6050703 [at] kippdata%3E

You can see my full config without the actual vhost here: https://github.com/shazarlx/kloxo/tree/httpd-light_2/kloxo/file/httpd-light

The vhost contains:
<IfDefine light>
ProxyPassReverse / http://127.0.0.1:8080/
RewriteEngine on
RewriteCond %{REQUEST_URI} .*\.(php)$
RewriteRule ^/(.*) http://127.0.0.1:8080/$1 [P]
</IfDefine>

Also I've switched the heavy side to prefork from itk but still the same results.

-Will


covener at gmail

Apr 7, 2012, 6:37 PM

Post #3 of 4 (299 views)
Permalink
Re: mod_proxy problem with APC on the backend [In reply to]

On Sat, Apr 7, 2012 at 6:58 PM, Will <william.leonard [at] lxcenter> wrote:
> With a light httpd worker front end as a reverse proxy to a mod_php backend
> everything works fine, until I enable APC for PHP on the backend.

Off-topic here, maybe you can find some advice on a PHP list or
http://httpd.apache.org/lists.html#http-users

http://httpd.apache.org/dev/debugging.html


i.galic at brainsware

Apr 8, 2012, 3:17 PM

Post #4 of 4 (282 views)
Permalink
Re: mod_proxy problem with APC on the backend [In reply to]

----- Original Message -----
> On Sat, Apr 7, 2012 at 6:58 PM, Will <william.leonard [at] lxcenter>
> wrote:
> > With a light httpd worker front end as a reverse proxy to a mod_php
> > backend
> > everything works fine, until I enable APC for PHP on the backend.
>
> Off-topic here, maybe you can find some advice on a PHP list or
> http://httpd.apache.org/lists.html#http-users
>
> http://httpd.apache.org/dev/debugging.html

recompile your PHP with --enable-maintainer-zts, should produce
a nice coredump every time you get see a Segmentation Fault right
now. Alternatively, load up xdebug, and start the whole thing as

gdb --args /usr/sbin/httpd -X

That is all I can say. The rest, as Eric said already, is best
dealt with more PHP affine folks.

i

--
Igor Galić

Tel: +43 (0) 664 886 22 883
Mail: i.galic [at] brainsware
URL: http://brainsware.org/
GPG: 6880 4155 74BD FD7C B515 2EA5 4B1D 9E08 A097 C9AE

Apache dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.