lag starting php 7.1.13 on CentOS 7.4.1708. how to fix?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite












PHP 7.1.13 on CentOS 7.4.1708



Inexplicable lag (2 to 10 seconds) just invoking php, even with empty script or just to get version info. I have never seen this before on any system and I'm not sure how to debug or fix this.



The lag can range from 2 to 10 seconds. It should take mere milliseconds, as on other systems. No other programs are experiencing this lag.



system load is negligible:



08:32:00 up 8 days, 2:23, 1 user, load average: 0.26, 0.29, 0.35


Can anyone provide advice on this?



Benchmarks:



$ time php -v
PHP 7.1.13 (cli) (built: Jan 4 2018 15:22:08) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies
with Zend OPcache v7.1.13, Copyright (c) 1999-2017, by Zend Technologies

real 0m1.916s
user 0m0.015s
sys 0m0.012s
$ time php -r ''

real 0m9.841s
user 0m0.015s
sys 0m0.009s



I'm not the admin of this machine, though I'm working with him to resolve this issue.



I can't say how this particular package was installed.




[edit]



it was recommended to run strace, and I noticed pauses at POLL. What is PHP poll doing?



poll([fd=3, events=POLLOUT], 1, 0) = 1 ([fd=3, revents=POLLOUT])



I'm trying to find out from the sys adm what is (or is supposed to be) on 10.226.139.110. It pings fine with no particular lag.



socket(AF_INET, SOCK_DGRAM|SOCK_NONBLOCK, IPPROTO_IP) = 3
connect(3, sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("10.226.139.110"), 16) = 0
poll([fd=3, events=POLLOUT], 1, 0) = 1 ([fd=3, revents=POLLOUT])
sendmmsg(3, MSG_CONFIRM, 50, msg_name(0)=NULL, msg_iov(1)=["!36711xxxyyy"..., 50], msg_controllen=0, msg_flags=MSG_CONFIRM, 50, 2, MSG_NOSIGNAL) = 2
poll([fd=3, events=POLLIN], 1, 5000) = 0 (Timeout)
socket(AF_INET, SOCK_DGRAM|SOCK_NONBLOCK, IPPROTO_IP) = 4
connect(4, sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("10.226.143.110"), 16) = 0
poll([fd=4, events=POLLOUT], 1, 0) = 1 ([fd=4, revents=POLLOUT])
sendmmsg(4, MSG_CONFIRM, 50, msg_name(0)=NULL, msg_iov(1)=["!36711xxxyyy"..., 50], msg_controllen=0, msg_flags=MSG_CONFIRM, 50, 2, MSG_NOSIGNAL) = 2
poll([fd=4, events=POLLIN], 1, 5000) = 1 ([fd=4, revents=POLLIN])
ioctl(4, FIONREAD, [148]) = 0
recvfrom(4, "!2420120011vcoloscrmweb16indepen"..., 2048, 0, sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("10.226.143.110"), [16]) = 148
poll([fd=4, events=POLLIN], 1, 2769) = 1 ([fd=4, revents=POLLIN])
ioctl(4, FIONREAD, [148]) = 0
recvfrom(4, "!36720120011xxxyyy"..., 65536, 0, sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("10.226.143.110"), [16]) = 148
close(3) = 0
close(4) = 0
socket(AF_INET, SOCK_DGRAM|SOCK_NONBLOCK, IPPROTO_IP) = 3
connect(3, sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("10.226.139.110"), 16) = 0
poll([fd=3, events=POLLOUT], 1, 0) = 1 ([fd=3, revents=POLLOUT])


--



php -m



[PHP Modules]
apcu
bcmath
bz2
calendar
Core
ctype
curl
date
dom
exif
fileinfo
filter
ftp
gd
gettext
hash
iconv
igbinary
imap
json
libxml
mbstring
mcrypt
memcached
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
pdo_sqlite
Phar
posix
readline
Reflection
session
shmop
SimpleXML
sockets
SPL
sqlite3
sqlsrv
standard
sysvmsg
sysvsem
sysvshm
tokenizer
wddx
xml
xmlreader
xmlwriter
xsl
Zend OPcache
zip
zlib

[Zend Modules]
Zend OPcache






share|improve this question






















  • How long does it take for the web server to server up standard html files?
    – Raman Sailopal
    Feb 1 at 14:40










  • This is only affecting CLI invocation of PHP. Via web (apache) PHP is serving with no lag.
    – fbas
    Feb 1 at 14:43






  • 2




    You can debug it further with strace.
    – Raman Sailopal
    Feb 1 at 14:50










  • @RamanSailopal thanks, added some strace output and notes to the original message
    – fbas
    Feb 1 at 15:07






  • 1




    10.226.139.110 is one of the DNS namesevers
    – fbas
    Feb 1 at 17:22














up vote
1
down vote

favorite












PHP 7.1.13 on CentOS 7.4.1708



Inexplicable lag (2 to 10 seconds) just invoking php, even with empty script or just to get version info. I have never seen this before on any system and I'm not sure how to debug or fix this.



The lag can range from 2 to 10 seconds. It should take mere milliseconds, as on other systems. No other programs are experiencing this lag.



system load is negligible:



08:32:00 up 8 days, 2:23, 1 user, load average: 0.26, 0.29, 0.35


Can anyone provide advice on this?



Benchmarks:



$ time php -v
PHP 7.1.13 (cli) (built: Jan 4 2018 15:22:08) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies
with Zend OPcache v7.1.13, Copyright (c) 1999-2017, by Zend Technologies

real 0m1.916s
user 0m0.015s
sys 0m0.012s
$ time php -r ''

real 0m9.841s
user 0m0.015s
sys 0m0.009s



I'm not the admin of this machine, though I'm working with him to resolve this issue.



I can't say how this particular package was installed.




[edit]



it was recommended to run strace, and I noticed pauses at POLL. What is PHP poll doing?



poll([fd=3, events=POLLOUT], 1, 0) = 1 ([fd=3, revents=POLLOUT])



I'm trying to find out from the sys adm what is (or is supposed to be) on 10.226.139.110. It pings fine with no particular lag.



socket(AF_INET, SOCK_DGRAM|SOCK_NONBLOCK, IPPROTO_IP) = 3
connect(3, sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("10.226.139.110"), 16) = 0
poll([fd=3, events=POLLOUT], 1, 0) = 1 ([fd=3, revents=POLLOUT])
sendmmsg(3, MSG_CONFIRM, 50, msg_name(0)=NULL, msg_iov(1)=["!36711xxxyyy"..., 50], msg_controllen=0, msg_flags=MSG_CONFIRM, 50, 2, MSG_NOSIGNAL) = 2
poll([fd=3, events=POLLIN], 1, 5000) = 0 (Timeout)
socket(AF_INET, SOCK_DGRAM|SOCK_NONBLOCK, IPPROTO_IP) = 4
connect(4, sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("10.226.143.110"), 16) = 0
poll([fd=4, events=POLLOUT], 1, 0) = 1 ([fd=4, revents=POLLOUT])
sendmmsg(4, MSG_CONFIRM, 50, msg_name(0)=NULL, msg_iov(1)=["!36711xxxyyy"..., 50], msg_controllen=0, msg_flags=MSG_CONFIRM, 50, 2, MSG_NOSIGNAL) = 2
poll([fd=4, events=POLLIN], 1, 5000) = 1 ([fd=4, revents=POLLIN])
ioctl(4, FIONREAD, [148]) = 0
recvfrom(4, "!2420120011vcoloscrmweb16indepen"..., 2048, 0, sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("10.226.143.110"), [16]) = 148
poll([fd=4, events=POLLIN], 1, 2769) = 1 ([fd=4, revents=POLLIN])
ioctl(4, FIONREAD, [148]) = 0
recvfrom(4, "!36720120011xxxyyy"..., 65536, 0, sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("10.226.143.110"), [16]) = 148
close(3) = 0
close(4) = 0
socket(AF_INET, SOCK_DGRAM|SOCK_NONBLOCK, IPPROTO_IP) = 3
connect(3, sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("10.226.139.110"), 16) = 0
poll([fd=3, events=POLLOUT], 1, 0) = 1 ([fd=3, revents=POLLOUT])


--



php -m



[PHP Modules]
apcu
bcmath
bz2
calendar
Core
ctype
curl
date
dom
exif
fileinfo
filter
ftp
gd
gettext
hash
iconv
igbinary
imap
json
libxml
mbstring
mcrypt
memcached
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
pdo_sqlite
Phar
posix
readline
Reflection
session
shmop
SimpleXML
sockets
SPL
sqlite3
sqlsrv
standard
sysvmsg
sysvsem
sysvshm
tokenizer
wddx
xml
xmlreader
xmlwriter
xsl
Zend OPcache
zip
zlib

[Zend Modules]
Zend OPcache






share|improve this question






















  • How long does it take for the web server to server up standard html files?
    – Raman Sailopal
    Feb 1 at 14:40










  • This is only affecting CLI invocation of PHP. Via web (apache) PHP is serving with no lag.
    – fbas
    Feb 1 at 14:43






  • 2




    You can debug it further with strace.
    – Raman Sailopal
    Feb 1 at 14:50










  • @RamanSailopal thanks, added some strace output and notes to the original message
    – fbas
    Feb 1 at 15:07






  • 1




    10.226.139.110 is one of the DNS namesevers
    – fbas
    Feb 1 at 17:22












up vote
1
down vote

favorite









up vote
1
down vote

favorite











PHP 7.1.13 on CentOS 7.4.1708



Inexplicable lag (2 to 10 seconds) just invoking php, even with empty script or just to get version info. I have never seen this before on any system and I'm not sure how to debug or fix this.



The lag can range from 2 to 10 seconds. It should take mere milliseconds, as on other systems. No other programs are experiencing this lag.



system load is negligible:



08:32:00 up 8 days, 2:23, 1 user, load average: 0.26, 0.29, 0.35


Can anyone provide advice on this?



Benchmarks:



$ time php -v
PHP 7.1.13 (cli) (built: Jan 4 2018 15:22:08) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies
with Zend OPcache v7.1.13, Copyright (c) 1999-2017, by Zend Technologies

real 0m1.916s
user 0m0.015s
sys 0m0.012s
$ time php -r ''

real 0m9.841s
user 0m0.015s
sys 0m0.009s



I'm not the admin of this machine, though I'm working with him to resolve this issue.



I can't say how this particular package was installed.




[edit]



it was recommended to run strace, and I noticed pauses at POLL. What is PHP poll doing?



poll([fd=3, events=POLLOUT], 1, 0) = 1 ([fd=3, revents=POLLOUT])



I'm trying to find out from the sys adm what is (or is supposed to be) on 10.226.139.110. It pings fine with no particular lag.



socket(AF_INET, SOCK_DGRAM|SOCK_NONBLOCK, IPPROTO_IP) = 3
connect(3, sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("10.226.139.110"), 16) = 0
poll([fd=3, events=POLLOUT], 1, 0) = 1 ([fd=3, revents=POLLOUT])
sendmmsg(3, MSG_CONFIRM, 50, msg_name(0)=NULL, msg_iov(1)=["!36711xxxyyy"..., 50], msg_controllen=0, msg_flags=MSG_CONFIRM, 50, 2, MSG_NOSIGNAL) = 2
poll([fd=3, events=POLLIN], 1, 5000) = 0 (Timeout)
socket(AF_INET, SOCK_DGRAM|SOCK_NONBLOCK, IPPROTO_IP) = 4
connect(4, sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("10.226.143.110"), 16) = 0
poll([fd=4, events=POLLOUT], 1, 0) = 1 ([fd=4, revents=POLLOUT])
sendmmsg(4, MSG_CONFIRM, 50, msg_name(0)=NULL, msg_iov(1)=["!36711xxxyyy"..., 50], msg_controllen=0, msg_flags=MSG_CONFIRM, 50, 2, MSG_NOSIGNAL) = 2
poll([fd=4, events=POLLIN], 1, 5000) = 1 ([fd=4, revents=POLLIN])
ioctl(4, FIONREAD, [148]) = 0
recvfrom(4, "!2420120011vcoloscrmweb16indepen"..., 2048, 0, sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("10.226.143.110"), [16]) = 148
poll([fd=4, events=POLLIN], 1, 2769) = 1 ([fd=4, revents=POLLIN])
ioctl(4, FIONREAD, [148]) = 0
recvfrom(4, "!36720120011xxxyyy"..., 65536, 0, sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("10.226.143.110"), [16]) = 148
close(3) = 0
close(4) = 0
socket(AF_INET, SOCK_DGRAM|SOCK_NONBLOCK, IPPROTO_IP) = 3
connect(3, sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("10.226.139.110"), 16) = 0
poll([fd=3, events=POLLOUT], 1, 0) = 1 ([fd=3, revents=POLLOUT])


--



php -m



[PHP Modules]
apcu
bcmath
bz2
calendar
Core
ctype
curl
date
dom
exif
fileinfo
filter
ftp
gd
gettext
hash
iconv
igbinary
imap
json
libxml
mbstring
mcrypt
memcached
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
pdo_sqlite
Phar
posix
readline
Reflection
session
shmop
SimpleXML
sockets
SPL
sqlite3
sqlsrv
standard
sysvmsg
sysvsem
sysvshm
tokenizer
wddx
xml
xmlreader
xmlwriter
xsl
Zend OPcache
zip
zlib

[Zend Modules]
Zend OPcache






share|improve this question














PHP 7.1.13 on CentOS 7.4.1708



Inexplicable lag (2 to 10 seconds) just invoking php, even with empty script or just to get version info. I have never seen this before on any system and I'm not sure how to debug or fix this.



The lag can range from 2 to 10 seconds. It should take mere milliseconds, as on other systems. No other programs are experiencing this lag.



system load is negligible:



08:32:00 up 8 days, 2:23, 1 user, load average: 0.26, 0.29, 0.35


Can anyone provide advice on this?



Benchmarks:



$ time php -v
PHP 7.1.13 (cli) (built: Jan 4 2018 15:22:08) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies
with Zend OPcache v7.1.13, Copyright (c) 1999-2017, by Zend Technologies

real 0m1.916s
user 0m0.015s
sys 0m0.012s
$ time php -r ''

real 0m9.841s
user 0m0.015s
sys 0m0.009s



I'm not the admin of this machine, though I'm working with him to resolve this issue.



I can't say how this particular package was installed.




[edit]



it was recommended to run strace, and I noticed pauses at POLL. What is PHP poll doing?



poll([fd=3, events=POLLOUT], 1, 0) = 1 ([fd=3, revents=POLLOUT])



I'm trying to find out from the sys adm what is (or is supposed to be) on 10.226.139.110. It pings fine with no particular lag.



socket(AF_INET, SOCK_DGRAM|SOCK_NONBLOCK, IPPROTO_IP) = 3
connect(3, sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("10.226.139.110"), 16) = 0
poll([fd=3, events=POLLOUT], 1, 0) = 1 ([fd=3, revents=POLLOUT])
sendmmsg(3, MSG_CONFIRM, 50, msg_name(0)=NULL, msg_iov(1)=["!36711xxxyyy"..., 50], msg_controllen=0, msg_flags=MSG_CONFIRM, 50, 2, MSG_NOSIGNAL) = 2
poll([fd=3, events=POLLIN], 1, 5000) = 0 (Timeout)
socket(AF_INET, SOCK_DGRAM|SOCK_NONBLOCK, IPPROTO_IP) = 4
connect(4, sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("10.226.143.110"), 16) = 0
poll([fd=4, events=POLLOUT], 1, 0) = 1 ([fd=4, revents=POLLOUT])
sendmmsg(4, MSG_CONFIRM, 50, msg_name(0)=NULL, msg_iov(1)=["!36711xxxyyy"..., 50], msg_controllen=0, msg_flags=MSG_CONFIRM, 50, 2, MSG_NOSIGNAL) = 2
poll([fd=4, events=POLLIN], 1, 5000) = 1 ([fd=4, revents=POLLIN])
ioctl(4, FIONREAD, [148]) = 0
recvfrom(4, "!2420120011vcoloscrmweb16indepen"..., 2048, 0, sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("10.226.143.110"), [16]) = 148
poll([fd=4, events=POLLIN], 1, 2769) = 1 ([fd=4, revents=POLLIN])
ioctl(4, FIONREAD, [148]) = 0
recvfrom(4, "!36720120011xxxyyy"..., 65536, 0, sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("10.226.143.110"), [16]) = 148
close(3) = 0
close(4) = 0
socket(AF_INET, SOCK_DGRAM|SOCK_NONBLOCK, IPPROTO_IP) = 3
connect(3, sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("10.226.139.110"), 16) = 0
poll([fd=3, events=POLLOUT], 1, 0) = 1 ([fd=3, revents=POLLOUT])


--



php -m



[PHP Modules]
apcu
bcmath
bz2
calendar
Core
ctype
curl
date
dom
exif
fileinfo
filter
ftp
gd
gettext
hash
iconv
igbinary
imap
json
libxml
mbstring
mcrypt
memcached
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
pdo_sqlite
Phar
posix
readline
Reflection
session
shmop
SimpleXML
sockets
SPL
sqlite3
sqlsrv
standard
sysvmsg
sysvsem
sysvshm
tokenizer
wddx
xml
xmlreader
xmlwriter
xsl
Zend OPcache
zip
zlib

[Zend Modules]
Zend OPcache








share|improve this question













share|improve this question




share|improve this question








edited Feb 1 at 15:28

























asked Feb 1 at 14:33









fbas

1265




1265











  • How long does it take for the web server to server up standard html files?
    – Raman Sailopal
    Feb 1 at 14:40










  • This is only affecting CLI invocation of PHP. Via web (apache) PHP is serving with no lag.
    – fbas
    Feb 1 at 14:43






  • 2




    You can debug it further with strace.
    – Raman Sailopal
    Feb 1 at 14:50










  • @RamanSailopal thanks, added some strace output and notes to the original message
    – fbas
    Feb 1 at 15:07






  • 1




    10.226.139.110 is one of the DNS namesevers
    – fbas
    Feb 1 at 17:22
















  • How long does it take for the web server to server up standard html files?
    – Raman Sailopal
    Feb 1 at 14:40










  • This is only affecting CLI invocation of PHP. Via web (apache) PHP is serving with no lag.
    – fbas
    Feb 1 at 14:43






  • 2




    You can debug it further with strace.
    – Raman Sailopal
    Feb 1 at 14:50










  • @RamanSailopal thanks, added some strace output and notes to the original message
    – fbas
    Feb 1 at 15:07






  • 1




    10.226.139.110 is one of the DNS namesevers
    – fbas
    Feb 1 at 17:22















How long does it take for the web server to server up standard html files?
– Raman Sailopal
Feb 1 at 14:40




How long does it take for the web server to server up standard html files?
– Raman Sailopal
Feb 1 at 14:40












This is only affecting CLI invocation of PHP. Via web (apache) PHP is serving with no lag.
– fbas
Feb 1 at 14:43




This is only affecting CLI invocation of PHP. Via web (apache) PHP is serving with no lag.
– fbas
Feb 1 at 14:43




2




2




You can debug it further with strace.
– Raman Sailopal
Feb 1 at 14:50




You can debug it further with strace.
– Raman Sailopal
Feb 1 at 14:50












@RamanSailopal thanks, added some strace output and notes to the original message
– fbas
Feb 1 at 15:07




@RamanSailopal thanks, added some strace output and notes to the original message
– fbas
Feb 1 at 15:07




1




1




10.226.139.110 is one of the DNS namesevers
– fbas
Feb 1 at 17:22




10.226.139.110 is one of the DNS namesevers
– fbas
Feb 1 at 17:22










1 Answer
1






active

oldest

votes

















up vote
1
down vote













Issue was that the value of /etc/hostname was not mapped in /etc/hosts to a local IP address. AND the IMAP module (imap.so) tries to resolve the hostname at init time (for reasons I can not comprehend), querying DNS. The hostname for this particular host was not registered in the company's DNS.



solution: edit /etc/hosts



127.0.0.1 [whatever the /etc/hostname is] 


(or some other local IP address)



thanks for your help @ramansailopal



https://serverfault.com/questions/586141/php-cli-with-imap-5-second-startup-delay






share|improve this answer






















    Your Answer







    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "106"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    convertImagesToLinks: false,
    noModals: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );








     

    draft saved


    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f421215%2flag-starting-php-7-1-13-on-centos-7-4-1708-how-to-fix%23new-answer', 'question_page');

    );

    Post as a guest






























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    1
    down vote













    Issue was that the value of /etc/hostname was not mapped in /etc/hosts to a local IP address. AND the IMAP module (imap.so) tries to resolve the hostname at init time (for reasons I can not comprehend), querying DNS. The hostname for this particular host was not registered in the company's DNS.



    solution: edit /etc/hosts



    127.0.0.1 [whatever the /etc/hostname is] 


    (or some other local IP address)



    thanks for your help @ramansailopal



    https://serverfault.com/questions/586141/php-cli-with-imap-5-second-startup-delay






    share|improve this answer


























      up vote
      1
      down vote













      Issue was that the value of /etc/hostname was not mapped in /etc/hosts to a local IP address. AND the IMAP module (imap.so) tries to resolve the hostname at init time (for reasons I can not comprehend), querying DNS. The hostname for this particular host was not registered in the company's DNS.



      solution: edit /etc/hosts



      127.0.0.1 [whatever the /etc/hostname is] 


      (or some other local IP address)



      thanks for your help @ramansailopal



      https://serverfault.com/questions/586141/php-cli-with-imap-5-second-startup-delay






      share|improve this answer
























        up vote
        1
        down vote










        up vote
        1
        down vote









        Issue was that the value of /etc/hostname was not mapped in /etc/hosts to a local IP address. AND the IMAP module (imap.so) tries to resolve the hostname at init time (for reasons I can not comprehend), querying DNS. The hostname for this particular host was not registered in the company's DNS.



        solution: edit /etc/hosts



        127.0.0.1 [whatever the /etc/hostname is] 


        (or some other local IP address)



        thanks for your help @ramansailopal



        https://serverfault.com/questions/586141/php-cli-with-imap-5-second-startup-delay






        share|improve this answer














        Issue was that the value of /etc/hostname was not mapped in /etc/hosts to a local IP address. AND the IMAP module (imap.so) tries to resolve the hostname at init time (for reasons I can not comprehend), querying DNS. The hostname for this particular host was not registered in the company's DNS.



        solution: edit /etc/hosts



        127.0.0.1 [whatever the /etc/hostname is] 


        (or some other local IP address)



        thanks for your help @ramansailopal



        https://serverfault.com/questions/586141/php-cli-with-imap-5-second-startup-delay







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Feb 5 at 11:48

























        answered Feb 2 at 14:52









        fbas

        1265




        1265






















             

            draft saved


            draft discarded


























             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f421215%2flag-starting-php-7-1-13-on-centos-7-4-1708-how-to-fix%23new-answer', 'question_page');

            );

            Post as a guest













































































            Popular posts from this blog

            Peggy Mitchell

            Palaiologos

            The Forum (Inglewood, California)