Invision Community 5: A video walkthrough creating a custom theme and homepage By Matt Thursday at 04:02 PM
GrooveOnBeat Posted March 27, 2019 Posted March 27, 2019 When I enable PHP-FPM, the site crashes with the errors below. The settings are default. Fatal error: Uncaught IPS\Db\Exception: No such file or directory in /home/mysite/public_html/forums/system/Db/Db.php:206 Stack trace: #0 /home/mysite/public_html/forums/system/Db/Db.php(119): IPS\_Db::_establishConnection('IPS\\Db', Array, true) #1 /home/mysite/public_html/forums/system/Data/Store/Database.php(89): IPS\_Db::i() #2 /home/mysite/public_html/forums/system/Data/Store/Database.php(105): IPS\Data\Store\_Database->loadIntoMemory(Array) #3 /home/mysite/public_html/forums/system/Data/Store/Database.php(159): IPS\Data\Store\_Database->get('cacheKeys') #4 /home/mysite/public_html/forums/system/Data/AbstractData.php(127): IPS\Data\Store\_Database->exists('cacheKeys') #5 /home/mysite/public_html/forums/system/Data/Store.php(215): IPS\Data\_AbstractData->__isset('cacheKeys') #6 /home/mysite/public_html/forums/system/Data/Store.php(206): IPS\Data\_Store->__isset('cacheKeys') #7 /home/mysite/public_html/forums/system/Settings/Settings.php(151): IPS\Data\_Store->__isset('settings') #8 /home/mysite/public_html/f in /home/mysite/public_html/forums/system/Db/Db.php on line 206 There is a Db directory and a Db.php file. Can anyone please help?
Makoto Posted March 27, 2019 Posted March 27, 2019 Make sure your MySQL connection info is correct, MySQL/MariaDB is running, and you have the php-mysqli extension installed.
GrooveOnBeat Posted March 27, 2019 Author Posted March 27, 2019 Thank you, @Makoto 5.5.5-10.0.38-MariaDB is installed. (Should I install 10.3+ instead?) php72-php-mysqlnd is installed. How do I know if MySQL connection info is correct?
bfarber Posted March 27, 2019 Posted March 27, 2019 You would check conf_global.php and verify the information is accurate. The error message means the software couldn't connect to MySQL or the specified database doesn't exist, generally speaking.
b416 Posted March 27, 2019 Posted March 27, 2019 When you enable php-fpm, you have to enable fastcgi also, and indicate in your apache config that .php files are managed by fastcgi.
Guest Shimei Posted March 27, 2019 Posted March 27, 2019 I ran into the same problem and had to change local host to 127.0.0.1 in the IPS config file which resolved the issue.
GrooveOnBeat Posted March 28, 2019 Author Posted March 28, 2019 Thanks for replying. 🙂 14 hours ago, bfarber said: You would check conf_global.php and verify the information is accurate. The error message means the software couldn't connect to MySQL or the specified database doesn't exist, generally speaking. The forum works when PHP-FPM is disabled. Is there a change in the conf_global.php when PHP-FPM is enabled? 14 hours ago, b416 said: When you enable php-fpm, you have to enable fastcgi also, and indicate in your apache config that .php files are managed by fastcgi. mod_fcgid wasn't enabled. 14 hours ago, Shimei said: I ran into the same problem and had to change local host to 127.0.0.1 in the IPS config file which resolved the issue. It was set to "localhost". I'll change it to 127.0.0.1 just in case.
GrooveOnBeat Posted March 28, 2019 Author Posted March 28, 2019 Update... I've installed mod_fcgid Changed localhost to 127.0.0.1 Enabled PHP-FPM As of now the site is up. Thank you everyone! The PHP-FPM settings are default. Are there changes you recommend?
Morgin Posted March 28, 2019 Posted March 28, 2019 8 hours ago, GrooveOnBeat said: Update... I've installed mod_fcgid Changed localhost to 127.0.0.1 Enabled PHP-FPM As of now the site is up. Thank you everyone! The PHP-FPM settings are default. Are there changes you recommend? These are not really questions that depend on invision or not. This is all very specific to your server. I don’t think anyone could give a realistic answer without more information.
GrooveOnBeat Posted March 29, 2019 Author Posted March 29, 2019 12 hours ago, Morgin said: These are not really questions that depend on invision or not. This is all very specific to your server. I don’t think anyone could give a realistic answer without more information. I figured so. It was worth a shot. 😄
Hexsplosions Posted March 29, 2019 Posted March 29, 2019 Are you on PHP 7.3? I had the same problem and moving to PHP 7.2 resolved it. My log showed there were segfaults and there appears to be a related bug: https://bugs.php.net/bug.php?id=77734
The Old Man Posted March 29, 2019 Posted March 29, 2019 Just FYI, I'm running PHP 7.3.3 on Apache with FPM/FastCGI and my global_configs use localhost. I got a database connection error when I tried the IP 127.0.0.1, not sure why it's the other way around for me (localhost works, 127.0.0.1 doesn't). I tried it both with and without the single quotes around the value.
b416 Posted March 29, 2019 Posted March 29, 2019 I think it depends on how you created your user in mysql, either with : CREATE USER 'user'@'localhost' IDENTIFIED BY 'password'; or CREATE USER 'user'@'127.0.0.1' IDENTIFIED BY 'password'; Edit : there is also a setting in my.cnf, skip-name-resolve, if it's set 'localhost' should not be working
b416 Posted March 29, 2019 Posted March 29, 2019 48 minutes ago, The Old Man said: Just FYI, I'm running PHP 7.3.3 on Apache with FPM/FastCGI and my global_configs use localhost. I got a database connection error when I tried the IP 127.0.0.1, not sure why it's the other way around for me (localhost works, 127.0.0.1 doesn't). I tried it both with and without the single quotes around the value. Do you see segfault errors in the logs? I have PHP 7.3.3 also, and I have a couple of them in the logs, but other than that the site seems to be working Ok.
The Old Man Posted March 29, 2019 Posted March 29, 2019 Are you finding them in the PHP error log or Apache log? I haven't seen any in the System or Error Logs in AdminCP but I do get infrequent 503 errors since the last week or so. I refresh the page and all is well, but they're pesky.
Hexsplosions Posted March 29, 2019 Posted March 29, 2019 10 hours ago, The Old Man said: Just FYI, I'm running PHP 7.3.3 on Apache with FPM/FastCGI and my global_configs use localhost. I got a database connection error when I tried the IP 127.0.0.1, not sure why it's the other way around for me (localhost works, 127.0.0.1 doesn't). I tried it both with and without the single quotes around the value. I was on PHP 7.3.3 when I encountered this too, and changing to PHP 7.2.X solved it. Worth a try?
b416 Posted March 29, 2019 Posted March 29, 2019 1 hour ago, The Old Man said: Are you finding them in the PHP error log or Apache log? I haven't seen any in the System or Error Logs in AdminCP but I do get infrequent 503 errors since the last week or so. I refresh the page and all is well, but they're pesky. In fact, I have 5 8 related messages each time (occuring times match), 9 times today : Ex. in apache error.log : [Fri Mar 29 16:33:09.495107 2019] [proxy_fcgi:error] [pid 20174:tid 140071707141888] [client x.x.x.x:8083] AH01067: Failed to read FastCGI header [Fri Mar 29 16:33:09.495133 2019] [proxy_fcgi:error] [pid 20174:tid 140071707141888] (104)Connection reset by peer: [client x.x.x.x:8083] AH01075: Error dispatching request to : in php7.3-fpm.log : [29-Mar-2019 16:33:09] WARNING: [pool www] child 29377 exited on signal 11 (SIGSEGV) after 4110.379052 seconds from start [29-Mar-2019 16:33:09] NOTICE: [pool www] child 1544 started in syslog : Mar 29 16:33:09 xxxxx kernel: [720275.127901] php-fpm7.3[29377]: segfault at 7fd45fe01018 ip 00007fd47a2b3e05 sp 00007fff7eadfe70 error 4 in mysqlnd.so[7fd47a292000+36000] Edit : in apache access.log : x.x.x.x - - [29/Mar/2019:16:33:09 +0100] "GET /forums/topic/293-sobno-bilje/?page=54&csrfKey=xxxxxxxxxxxxxxxxxxxxxxxxxxx HTTP/2.0" 503 717 "-" "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:56.0) Gecko/20100101 Firefox/56.0" x.x.x.x - - [29/Mar/2019:16:33:09 +0100] "GET /forums/topic/293-sobno-bilje/?page=54 HTTP/2.0" 301 184 "-" "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:56.0) Gecko/20100101 Firefox/56.0" x.x.x.x - - [29/Mar/2019:16:33:09 +0100] "GET /forums/topic/293-sobno-bilje/page/54/ HTTP/2.0" 200 28572 "-" "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:56.0) Gecko/20100101 Firefox/56.0" It seems that the user does not even see the 503 error, as the page is accessed right after with a return code 301 then 200
opentype Posted March 30, 2019 Posted March 30, 2019 12 hours ago, The Old Man said: but I do get infrequent 503 errors since the last week or so. Same here, when on PHP 7.3. My managed server has a PHP-FPM setup with OPcache and APCu. On 7.3 all my sites get 503s. The busier the site, the more there are. Never happened at all with other PHP versions. So I’m staying on 7.2 for the time being. That works flawlessly and super fast. But I would still be interested to know what the cause of the 503s is.
GrooveOnBeat Posted March 30, 2019 Author Posted March 30, 2019 As an experiment I switched back to "localhost" in conf_global and got the error. The 127.0.0.1 works for me. I created the user in cPanel. 23 hours ago, The Heff said: Are you on PHP 7.3? I had the same problem and moving to PHP 7.2 resolved it. PHP-FPM is running on PHP 7.2.16. PHP 7.3 is installed but has not been used.
The Old Man Posted April 12, 2019 Posted April 12, 2019 Just wondering if you guys are still seeing 503 Service Unavailable errors? My server updated from 7.3.3 to 7.3.4 and I'm still getting them. However I only get them when logged into IPS, I don't get them when viewing as a guest or when viewing non-IPS Community dynamic pages. Nothing ever shows in my logs. It happens with Safari iOS and Chrome iOS. Refreshing the page usually works first time, only once did it take about a minute before the page would reload. The only thing I can say is that it never happened on PHP7.2 but there has been IPS updates since then so I can't rule anything out. I may go back to 7.2 for a while. I'm using latest versions of Apache, CentOS, MariaDB, Redis cache, Opcache.
The Old Man Posted April 12, 2019 Posted April 12, 2019 Aha, I managed to find some relevant error_log entries... [Fri Apr 12 16:00:26.293312 2019] [proxy_fcgi:error] [pid 11095:tid 47992908289792] [client xxx.xxx.xxx.249:45382] AH01067: Failed to read FastCGI header, referer: https://mysite.net/forum-126-forum-name/ [Fri Apr 12 16:00:26.293357 2019] [proxy_fcgi:error] [pid 11095:tid 47992908289792] (104)Connection reset by peer: [client xxx.xxx.xxx.249:45382] AH01075: Error dispatching request to : , referer: https://mysite.net/forum/126-forum-name/ Looks like those mentioned above.
opentype Posted April 12, 2019 Posted April 12, 2019 23 minutes ago, The Old Man said: Failed to read FastCGI header Mhh. 🤔https://serverpilot.io/docs/error-failed-to-read-fastcgi-header Quote The most common cause of these errors is buggy PHP code in your app. 🙈
Gabriel Torres Posted May 20, 2019 Posted May 20, 2019 On 3/30/2019 at 6:34 AM, opentype said: But I would still be interested to know what the cause of the 503s is. A bug with PHP 7.3. For those interested, the in-depth discussion and confirmation that this is indeed a bug is here: https://invisioncommunity.com/forums/topic/452400-php-fpm-several-exited-on-signal-11-sigsegv/
Recommended Posts
Archived
This topic is now archived and is closed to further replies.