WordPress install went bad Now getting a 502 bad gateway and no way to reverse

What app is this about, and its version: WordPress
What YunoHost version are you running: 6.9.1~ynh1 to 6.9.4~ynh1
What type of hardware are you using: VPS bought online

Describe your issue

I went to update https://directory.jbnphilly.com in the Yunohost install I have and it is now giving me a 502 error. How do I roll this back?

Share relevant logs or error messages

doesn’t provide the log! Um… Help!

I will happily provide a login to my Yunohost instance if you reach out. I have no idea what happened.

Hi pch !

Do you have access to your Yunohost admin page ?

The link seems working. Please do not provide login / password to your Yunohost.

When logged in the administration panel, then go to the Tools Menu, Then logs, then click on the line where you can see “wordpress update” (or something like that), and you’ll find a button “Share the logs with YunoPaste”

It’s not there. That’s the first place I looked. I’m moving the WordPress out of Yuno to another host. Luckily I have a backup.

Very strange bug.

The 502 error is saying that a service providing the root webpage is not working.
Have you looked in Tools > Services to check is there’s a service not working ?

Under /var/run/php, is there a file named php8.5-fpm-wordpress.sock?

Under /etc/php/8.5/fpm/pool.d, do you have a file wordpress.conf?

502 would indicate PHP 8.5-FPM pool that’s supposed to serve WordPress is gone somehow :thinking:

Yea it’s not there. Very weird. Thanks for your response. I’m stumped.

What version are you currently running? Perhaps it’s a one from before the switch to PHP 8.5?

Force-upgrading the app should regenerate these.

Sadly I don’t have an answer to this but it is exactly the same symptom as happened to my recent broken NC upgrade. 502 Bad Gateway. That remains unsolved after lots of deep digging. I would be keen to understand the answer to this one…

Hi, I have the same issue.

These are my logs:

Now I get 502 bad gateway (there is no such thing as Wordpress service), no php8.5-fpm-wordpress.sock under /var/run/php (all the php are 8.4), and no 8.5 directory under /etc/php.

VPS, bookworm, 12.1.39 (stable)

Hi xabi

Could you check the message below and do the correction needed ?

Ok, a lot of php stuff got updated. And now?

Do I uninstall wordpress and restore from a backup? Because even if yunohost shows wordpress is upgradeable,

Warning: File or folder ‘/etc/php/8.4/fpm/pool.d/wordpress.conf’ to be backed up does not exist

Error: Failed to collect files to backed up for wordpress.

Hello

It seems that the update process have moved the data from the /8.4 directory to the /8.5 directory.

Therefore, I suggest to make a copy of all the files that are located in the /etc/php/8.5/fpm/pool.d/ to the 8.4 directory (/etc/php/8.4/fpm/pool.d/) and to move the files present in the 8.5 pool.d directory to a .backup extension.

The first mkdir is to make sure the the directory still exist.

mkdir -p /etc/php/8.4/fpm/pool.d/
cp /etc/php/8.5/fpm/pool.d/*.* /etc/php/8.4/fpm/pool.d/ 
mv /etc/php/8.5/fpm/pool.d/*.conf /etc/php/8.5/fpm/pool.d/*.conf.backup 

Hi,

/etc/php/8.4/fpm/pool.d/ does exist, but /php/8.5 doesn’t, so there is nothing to copy.

I don’t know where the lost wordpress.conf could be :face_with_diagonal_mouth:

My phps: 7.4 8.0 8.1 8.2 8.3 8.4

@xabi
You can try upgrading without backup (option -b or --no-safety-backup) or try to recreate the missing file and then upgrade.

nano /etc/php/8.4/fpm/pool.d/wordpress.conf
[wordpress]

user = wordpress
group = wordpress

chdir = /var/www/wordpress

listen = /var/run/php/php8.4-fpm-wordpress.sock
listen.owner = www-data
listen.group = www-data

pm = ondemand
pm.max_children = 16
pm.max_requests = 500
request_terminate_timeout = 1d

pm.process_idle_timeout = 10s
php_admin_value[upload_max_filesize] = 50M
php_admin_value[post_max_size] = 50M
php_admin_value[memory_limit] = 128M
; Additional php.ini defines, specific to this pool of workers.


php_admin_value[upload_tmp_dir] = /var/www/wordpress/wp-content/temp/

cc @MariusBaguepi

I restored the file from a backup and upgraded Wordpress without issue. Thank you very much!

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.