On 14/02/2017 9:00 AM, Reyk Floeter wrote:
Hi,

On Tue, Feb 14, 2017 at 07:24:17AM -0700, Steve Williams wrote:
Hi,

I have a web based application (Gallery 3) on one web server with a
fairly large number of photos.

I have nfs mounted that folder onto a new APU2 system with OpenBSD 6.0
on it.
192.168.123.3:/ext_gallery/gallery3 520142836  89008296 405127400
18%    /var/www/htdocs/gallery3

A very simple httpd.conf file:

server "photos.williamsitconsulting.com" {
          listen on $ext_addr port 80
          root "/htdocs/gallery3"
          directory index index.php

          location "*.php" {
                  fastcgi socket "/run/php-fpm.sock"
          }
}


I cannot access the "index.php" file with a web browser.

I believe I have confirmed that it's not a problem with chroot itself...

     # chroot -g www -u www /var/www /bin/ksh
     $ cd /htdocs/gallery3
     $ echo *
     LICENSE README application bin index.php installer lib modules
     php.ini robots.txt system themes var
                                     ^^^^^^^^^


To troubleshoot, I unmounted the NFS folder and copied a portion of over
to /var/www/htdocs/gallery3.  Accessing the information locally works
fine.  Unfortunately, I don't have disk space on the APU2 system to copy
the entire folder over (it's got a ton of photos in it).

I suspect this is to do with some kind of conflict between nfs, httpd
and chroot.

With the NFS mounted, I've run "httpd -d -v -v -v -v -v -v" and I don't
get any errors when I try to access the index.php, it just doesn't serve
anything up (likely because there's nothing there!).

There's no message in the error.log, and I have tried putting php-fpm
into "debug" mode and there's nothing relevant logged there either.

What am I missing?  or is this even possible?

It is really hard to tell without logs, but the problem can also be in
php-fpm, not just in httpd.  Can you access files that are not served
via fastcgi (static files, images)?

You could try to start httpd with the following way:

# env EVENT_NOKQUEUE=1 httpd -ddvvv

This will switch libevent from kqueue to poll.  We had kernel-related
with kqueue on NFS in the past, but should have been fixed.

Reyk

Hi,

I haven't been able to find out how to turn on logging that would indicate httpd is passing things off to fastcgi.

I can see that httpd is getting the request, but it's getting "lost" somewhere. Is there a way to log what goes down the php-fpm.sock?

Thanks for the pointer about serving static content... Static content WORKS.

photos.williamsitconsulting.com 192.168.123.129 - - [14/Feb/2017:09:15:12 -0700] "GET /help.txt HTTP/1.1" 304 0 server photos.williamsitconsulting.com, client 1 (1 active), 192.168.123.129:56879 -> 192.168.123.5, /help.txt (304 Not Modified)


I did try your suggestion:

# /etc/rc.d/httpd stop
httpd(ok)
# env EVENT_NOKQUEUE=1 httpd -ddvvv
startup
socket_rlimit: max open files 1024
server_privinit: adding server default
server_privinit: adding server photos.williamsitconsulting.com
socket_rlimit: max open files 1024
socket_rlimit: max open files 1024
server_launch: running server default
server_launch: running server default
server_launch: running server default
photos.williamsitconsulting.com 192.168.123.129 - - [14/Feb/2017:09:11:19 -0700] "GET /index.php HTTP/1.1" 500 0

and the browser (chrome on Windows 7) gets a "500" error.

In /var/log/php-fpm.log, all I get is one line per minute:

[14-Feb-2017 09:13:48.393910] DEBUG: pid 9016, fpm_pctl_perform_idle_server_maintenance(), line 379: [pool www] currently 0 active children, 2 spare children, 2 running children. Spawning rate 1 [14-Feb-2017 09:13:49.404199] DEBUG: pid 9016, fpm_pctl_perform_idle_server_maintenance(), line 379: [pool www] currently 0 active children, 2 spare children, 2 running children. Spawning rate 1 [14-Feb-2017 09:13:50.414479] DEBUG: pid 9016, fpm_pctl_perform_idle_server_maintenance(), line 379: [pool www] currently 0 active children, 2 spare children, 2 running children. Spawning rate 1 [14-Feb-2017 09:13:51.424717] DEBUG: pid 9016, fpm_pctl_perform_idle_server_maintenance(), line 379: [pool www] currently 0 active children, 2 spare children, 2 running children. Spawning rate 1 [14-Feb-2017 09:13:52.434982] DEBUG: pid 9016, fpm_pctl_perform_idle_server_maintenance(), line 379: [pool www] currently 0 active children, 2 spare children, 2 running children. Spawning rate 1

Any other amazing words of wisdom?

Thanks,
Steve W.

Reply via email to