php7-fpm ERROR: failed to retrieve TCP_INFO for socket: Protocol not available (92)

3.2k views Asked by At

I'm using abisoft/caddy-php docker image to run a basic php site. On all the images I'm building using this my /var/log/php7 file every millisecond writes

ERROR: failed to retrieve TCP_INFO for socket: Protocol not available (92)

When I connect via socket these errors go away. Everything works fine even though this error is being thrown. If it's a false error, how can I keep it out of my log files?

Caddyfile

my.domain.com

root /srv/public
gzip

fastcgi / 127.0.0.1:9000 php {
    root /srv/public
    index index.php
}

rewrite {
r .*
    ext /
    to /index.php?{query}
}

startup php-fpm7

log ./storage/logs/caddy-access.log
errors ./storage/logs/caddy-error.log

Dockerfile

FROM abiosoft/caddy:php
COPY Caddyfile /etc/Caddyfile
COPY app/ /srv
1

There are 1 answers

0
diandian_xue On

Because your system does not support TCP_INFO, you can rebuild php by source code. find source main/php_config.h and modify

-- #define HAVE_LQ_TCP_INFO 1
++ //#define HAVE_LQ_TCP_INFO 1

make && make install