Apache stopped serving pages from one virtualhost website
by 6th_sense from LinuxQuestions.org on (#5B786)
Hi folks,
Setup:
I have 3 wordpress installations - 2 of which are running one website - and are running properly, and a third wordpress installation which runs a second website - under a virtualhost, whose pages were being served for the past 2 weeks until the day before yesterday.
Problem:
The day before yesterday the second website went down. It is running the Divi theme from elegant themes on wordpress, and I was busy setting some google map parameters with it - and that had seemed to work. The day after - the website seems to be taking waaaay too long to load and finishes with this error:
Webpage Error:
The following error was encountered while trying to retrieve the URL: http://www.mywebsite.ca/
Connection to 107.192.xxx.xxx failed.
The system returned: (110) Connection timed out
The remote host or network may be down. Please try the request again.
Your cache administrator is webmaster.
Error Log files:
The log files show the following errors:
# tail error_log
[Thu Dec 03 00:29:05.289574 2020] [php7:warn] [pid 15912] [client 185.220.101.193:27278] PHP Warning: preg_match(): Allocation of JIT memory failed, PCRE JIT will be disabled. This is likely caused by security restrictions. Either grant PHP permission to allocate executable memory, or set pcre.jit=0 in /var/www/html/wp-includes/load.php on line 43, referer: https://www.google.com/search
[Thu Dec 03 00:34:26.945260 2020] [php7:warn] [pid 15943] [client 96.236.112.176:46521] PHP Warning: preg_match(): Allocation of JIT memory failed, PCRE JIT will be disabled. This is likely caused by security restrictions. Either grant PHP permission to allocate executable memory, or set pcre.jit=0 in /var/www/mywebsite.ca/html/wp-includes/load.php on line 43
[Thu Dec 03 00:36:36.271136 2020] [php7:warn] [pid 15947] [client 104.196.119.37:54127] PHP Warning: preg_match(): Allocation of JIT memory failed, PCRE JIT will be disabled. This is likely caused by security restrictions. Either grant PHP permission to allocate executable memory, or set pcre.jit=0 in /var/www/html/wp-includes/load.php on line 43
[Thu Dec 03 00:37:05.721395 2020] [php7:warn] [pid 15955] [client 104.196.119.37:48935] PHP Warning: preg_match(): Allocation of JIT memory failed, PCRE JIT will be disabled. This is likely caused by security restrictions. Either grant PHP permission to allocate executable memory, or set pcre.jit=0 in /var/www/html/wp-includes/load.php on line 43
[Thu Dec 03 09:42:11.207556 2020] [mpm_prefork:notice] [pid 14433] AH00170: caught SIGWINCH, shutting down gracefully
[Thu Dec 03 09:42:13.010407 2020] [core:notice] [pid 18916] SELinux policy enabled; httpd running as context system_u:system_r:httpd_t:s0
[Thu Dec 03 09:42:13.036720 2020] [suexec:notice] [pid 18916] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Thu Dec 03 09:42:13.124936 2020] [lbmethod_heartbeat:notice] [pid 18916] AH02282: No slotmem from mod_heartmonitor
[Thu Dec 03 09:42:13.548250 2020] [mpm_prefork:notice] [pid 18916] AH00163: Apache/2.4.6 (CentOS) PHP/7.3.24 configured -- resuming normal operations
[Thu Dec 03 09:42:13.548354 2020] [core:notice] [pid 18916] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
<<<<================================= End Error Log Tail =================>>>
Thoughts:
One of the virtual machines of Apache seems to be working fine - under wordpress. It is running a custom-made Divi theme. It takes very little time to load - and it has many videos from youtube to load.
The other site - I downloaded a premade layout for Divi and I installed absolutely no other wordpress plugins.
So, I don't know what is wrong there... although I did have to create a Google Cloud account to get the google map plugin to half work - the markers for locations (2) are on the map, but when I clicked on the markers - they didn't give an address.
Tried:
Found a forum that suggested that adding pcre.jit=0 in php.ini would solve the problem to others.
Put that in /etc/php.ini
(Not exactly sure what that does, but did it)
I believe that that is why one error [mpm_prefork:notice] onwards doesn't show the earlier pcre.jit error, thoug I think I will test that theory to see if that is correct.
Other websites suggest that the move to php 7.4 is troubling to wordpress and some of the plugins, and so a downgrade may be necessary. Not quite sure how to do that - although there seems to be one site that described some complicated stuff to do so (with nary an explanation) - Quite scary.
# php -v
reveals:
HP 7.3.24 (cli) (built: Oct 27 2020 11:01:59) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.24, Copyright (c) 1998-2018 Zend Technologies
#
trying to connect to mywebsite.ca/phpinfo(); - yeilds the same error as shown above with the other pages. But, as before this was a page that loaded fine just a couple of days before. This suggests that the theme and wordpress may have nothing to do with this issue.
Not sure of anything else I can do now, aside from figuring out how to get at the php logs, perhaps?
-6th


Setup:
I have 3 wordpress installations - 2 of which are running one website - and are running properly, and a third wordpress installation which runs a second website - under a virtualhost, whose pages were being served for the past 2 weeks until the day before yesterday.
Problem:
The day before yesterday the second website went down. It is running the Divi theme from elegant themes on wordpress, and I was busy setting some google map parameters with it - and that had seemed to work. The day after - the website seems to be taking waaaay too long to load and finishes with this error:
Webpage Error:
The following error was encountered while trying to retrieve the URL: http://www.mywebsite.ca/
Connection to 107.192.xxx.xxx failed.
The system returned: (110) Connection timed out
The remote host or network may be down. Please try the request again.
Your cache administrator is webmaster.
Error Log files:
The log files show the following errors:
# tail error_log
[Thu Dec 03 00:29:05.289574 2020] [php7:warn] [pid 15912] [client 185.220.101.193:27278] PHP Warning: preg_match(): Allocation of JIT memory failed, PCRE JIT will be disabled. This is likely caused by security restrictions. Either grant PHP permission to allocate executable memory, or set pcre.jit=0 in /var/www/html/wp-includes/load.php on line 43, referer: https://www.google.com/search
[Thu Dec 03 00:34:26.945260 2020] [php7:warn] [pid 15943] [client 96.236.112.176:46521] PHP Warning: preg_match(): Allocation of JIT memory failed, PCRE JIT will be disabled. This is likely caused by security restrictions. Either grant PHP permission to allocate executable memory, or set pcre.jit=0 in /var/www/mywebsite.ca/html/wp-includes/load.php on line 43
[Thu Dec 03 00:36:36.271136 2020] [php7:warn] [pid 15947] [client 104.196.119.37:54127] PHP Warning: preg_match(): Allocation of JIT memory failed, PCRE JIT will be disabled. This is likely caused by security restrictions. Either grant PHP permission to allocate executable memory, or set pcre.jit=0 in /var/www/html/wp-includes/load.php on line 43
[Thu Dec 03 00:37:05.721395 2020] [php7:warn] [pid 15955] [client 104.196.119.37:48935] PHP Warning: preg_match(): Allocation of JIT memory failed, PCRE JIT will be disabled. This is likely caused by security restrictions. Either grant PHP permission to allocate executable memory, or set pcre.jit=0 in /var/www/html/wp-includes/load.php on line 43
[Thu Dec 03 09:42:11.207556 2020] [mpm_prefork:notice] [pid 14433] AH00170: caught SIGWINCH, shutting down gracefully
[Thu Dec 03 09:42:13.010407 2020] [core:notice] [pid 18916] SELinux policy enabled; httpd running as context system_u:system_r:httpd_t:s0
[Thu Dec 03 09:42:13.036720 2020] [suexec:notice] [pid 18916] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Thu Dec 03 09:42:13.124936 2020] [lbmethod_heartbeat:notice] [pid 18916] AH02282: No slotmem from mod_heartmonitor
[Thu Dec 03 09:42:13.548250 2020] [mpm_prefork:notice] [pid 18916] AH00163: Apache/2.4.6 (CentOS) PHP/7.3.24 configured -- resuming normal operations
[Thu Dec 03 09:42:13.548354 2020] [core:notice] [pid 18916] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
<<<<================================= End Error Log Tail =================>>>
Thoughts:
One of the virtual machines of Apache seems to be working fine - under wordpress. It is running a custom-made Divi theme. It takes very little time to load - and it has many videos from youtube to load.
The other site - I downloaded a premade layout for Divi and I installed absolutely no other wordpress plugins.
So, I don't know what is wrong there... although I did have to create a Google Cloud account to get the google map plugin to half work - the markers for locations (2) are on the map, but when I clicked on the markers - they didn't give an address.
Tried:
Found a forum that suggested that adding pcre.jit=0 in php.ini would solve the problem to others.
Put that in /etc/php.ini
(Not exactly sure what that does, but did it)
I believe that that is why one error [mpm_prefork:notice] onwards doesn't show the earlier pcre.jit error, thoug I think I will test that theory to see if that is correct.
Other websites suggest that the move to php 7.4 is troubling to wordpress and some of the plugins, and so a downgrade may be necessary. Not quite sure how to do that - although there seems to be one site that described some complicated stuff to do so (with nary an explanation) - Quite scary.
# php -v
reveals:
HP 7.3.24 (cli) (built: Oct 27 2020 11:01:59) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.24, Copyright (c) 1998-2018 Zend Technologies
#
trying to connect to mywebsite.ca/phpinfo(); - yeilds the same error as shown above with the other pages. But, as before this was a page that loaded fine just a couple of days before. This suggests that the theme and wordpress may have nothing to do with this issue.
Not sure of anything else I can do now, aside from figuring out how to get at the php logs, perhaps?
-6th