Custombuild 2.0 with multiple php releases not working when applying php2_release to subdomain only - 503 Service Unavailable / Missing Sockets

rubens

New member
Joined
Mar 11, 2020
Messages
2
Hi,

I'm using Custombuild 2.0.0 (rev: 2434) and have enabled 2 PHP versions:

1584178412675.png

I followed this thread to add the php2_release to a subdomain:
How to use a different PHP version on a subdomain with custombuild 2?

But I had to add the version in as text instead of dynamically with the token PHP2_RELEASE. Because that's apparently giving me 0 back:

1584178420099.png

I eventually got the httpd.conf to work by adding this to CUSTOM3:

Code:
|*if SUB="test"|
   <FilesMatch "\.(inc|php|phtml|phps|php73)$">
      <If "-f %{REQUEST_FILENAME}">
        AddHandler "proxy:unix:/usr/local/php73/sockets/|USER|.sock|fcgi://localhost" .inc .php .phtml .php73
      </If>
   </FilesMatch>
</Directory>
# Dummy to override default php version
<Directory |DOCROOT|/test/php56/>
|*endif|

But now on the subdomain I'm getting a
503 Service Unavailable
Service Unavailable

The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.


After checking the logs of the subdomain, it gives the following error:

[Wed Mar 11 18:44:50.704231 2020] [proxy:error] [pid 13255:tid 140090535659264] (13)Permission denied: AH02454: FCGI: attempt to connect to Unix domain socket /usr/local/php73/sockets/admin.sock (*) failed

When I check the folder:
/usr/local/php73/sockets/

The only socket in it, is:
webapps.sock

So the error makes sence that the file admin.sock can't be found.

I checked if php-fpm is running for php73:
Code:
/usr/local/php73/bin/php -v

Which gives me:

1584178441337.png

Also when I check the services, it says it's running properly:

1584178445484.png

So the question is how can I fix that I don't get the 503 error?
How to fix that Apache isn't creating the admin.sock file?

Thanks in advance,

Cheers,
Ruben
 
So I got a little bit further.
I added a new domain (test2.domainname) and changed the DOCROOT in the httpd.conf to the test subdomain folder.
I could switch the test2 domain to php-73 from directadmin.
The admin.sock file is now created, but I still get an error:

Code:
[Sun Mar 15 16:45:57.204852 2020] [proxy:error] [pid 43189:tid 140089847457536] (13)Permission denied: AH02454: FCGI: attempt to connect to Unix domain socket /usr/local/php73/sockets/admin.sock (*) failed
[Sun Mar 15 16:45:57.204905 2020] [proxy_fcgi:error] [pid 43189:tid 140089847457536] [client xx.xx.xx.xx:xxxxxx] AH01079: failed to make connection to backend: httpd-UDS
 
PHP selector feature for subdomains is available in pre-release.
 
I have got the same error but only sometimes especially for the first request after long time no request. (I noticed this on phpMyAdmin of one website which has not been used often, so every first time calling phpMyAdmin, there will be a phpMyAdmin home page rendered but some background AJAX request will get "503 Service Unavailable" replied and I will see the same error message in domain-name.error.log.)

I checked the permisson of all the .sock files and they are all 0660. (This symptom happen also on the other domains of other users on the same machine and it happens mostly on the first request after long time no request.

The other related question is why it is admin.sock rather than <domain-owner-username>.sock?
 
Back
Top