Jump to content

PHP-FPM Error When Enabled


Recommended Posts

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?

Link to comment
Share on other sites

Guest Shimei

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.

Link to comment
Share on other sites

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.

2019-03-27_190007.jpg.0ec817433814b0d276b8bd4cd9488a34.jpg

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.

Link to comment
Share on other sites

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. 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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 

 

Link to comment
Share on other sites

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. 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 2 weeks later...

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.

 

Link to comment
Share on other sites

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.

 

Link to comment
Share on other sites

  • 1 month later...

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...