Some strange behavior with hestiacp

Hi Guys,
I have some strange behavior with hestiacp.
i created subdomain from rest api and its working well
then i set ssl to the subdomain using rest api and wll working well
then i run small bash script that clone wp from one subdomain to the new subdomain.
all this also working. but when try to enter to the new subdomain url i get error 500.
i checked logs and see this error:
2021/01/16 12:38:45 [crit] 1342890#1342890: *11686 connect() to unix:/run/php/php7.4-fpm-3023.mysite.com.sock failed (2: No such file or directory) while connecting to upstream, client: 67.205.165.53, server: 3023.mysite.com, request: "GET / HTTP/2.0", upstream: "fastcgi://unix:/run/php/php7.4-fpm-3023.mysite.com.sock:", host: "3023.mysite.com"

the subdomain exists and all files also there but still get error 500
to fix this, i need to restart php-fpm and then the new subdomain start working.

any sugstions?

Thanks

Hmm, can you share the exact steps you used to create the subdomain? It sounds like the fpm service will not be restarted correctly after domain creation. A current workaround would be to trigger v-restart-service php-fpm after you created the subdomain, but personaly I dont think this should be the way to go :slight_smile:.

Also if you would like to share your script as soon as it is working properly, it could be usefull for the community.

the creation subdomain is fine.
and i have used the example from:
https://docs.hestiacp.com/admin_docs/rest_api.html

if the bash file not runs, subdomain working fine
the bash file just copy files from one subdomain to another + wp cli that export db and import to the new one.

but after this process php fpm giver error 500

any ideas?

and sure after i will finish the script, i can share it.

Probaly you only see the 500 error because you try to use php. The default skelletion will just copy a index.html, no php code in it. As soon as you try to execute a php script, it shows you a 500.

You can verify the behaviour when you stop the script before you copy the files, then create a index.php with phpinfo(); and try to access it. Basicly it should give you a 500 internal server error.

if i stop the script. the php working fine.
i replace index.html with some php file and all working fine.
that really strange!

Know issue

How ever the only solution that I found that works “fine” is use a second server the send the api requests from. Any suggestions that works is appreciated…

i tried to make api call from another server and still have the same error