Backlight update

I have just updated to backlight 4 everything seems ok other than when trying to access any of my galleries i am getting “502 bad gateway” error

https://tsiphotography.co.uk/galleries/weddings/

Have you tried:
Clearing template cache
Update album files

(both found under “Special links” on the main Backlight dashboard.

yes done all that

Try reinstalling.
What version of php is your host using?

I have reinstalled all modules etc

PHP Version 7.4.22

Direct links to any of the galleries seems to work fine it’s just the index files I.E Album Sets

I seem to recall, we habitually have issues with your server in particular. Remind me, who are you hosting with?

@Ben should be able to advise.

Hi Matt, I am with Ionos but I don’t think it is a hosting issue as I can view Album sets just not the most important two.

https://www.tsiphotography.co.uk/galleries/portraits/

https://www.tsiphotography.co.uk/galleries/weddings/

All my album sets were created about the same time but the one below works fine although not really used anymore

Thanks. It’s still sleeping hours in Australia, so while we wait for Ben to start his day, here’s some reading from your host:

I would also escalate this issue to your host’s support in the meantime. Hopefully we can attack this from both sides and reach a resolution quickly.

The error message says: “502 Bad Gateway nginx”. I would check in the c-panel on what configuration options you have for nginx.

I’m using Ionos without problems, but I’m on Apache and not Nginx.

Hi Daniel,

Unfortunately i struggle through at the best of times so have no idea what i’d be looking for. Considering I can get a new Album set working I’m reluctant to start playing around with server settings and make things worse

That might as well be written in a foreign language Matt :frowning:

If @Ben doesn’t have them yet, send him your ftp and backlight credentials. This way he can look around the server if he has to.

Good morning, @mridley. A 502 Bad Gateway error implies that one server could not talk to another. It looks like your web site is fronted by an Nginx server which then forwards requests on to an Apache server.

Thanks for the access. Your error logs are available via FTP, however I can’t see any errors raised from the Weddings link above. There is one error that looks quite serious, and that could be the underlying cause of issues:

No space left on device: [client 81.107.167.227:46462] AH00646: Error writing to /var/www/vhosts/system/tsiphotography.co.uk/logs/access_ssl_log

Do you have any large files on your server that could have used up your allocated space? You may need to ask your host’s technical support for help to solve that.

1 Like

Hi Ben,

The no space left was an error that appeared due to a backup being done on the server, the server is showing 60gb free space after this was deleted.

I am able to create a new Album set and then create new galleries within this Album set without any issues and all of the following albums sets work
https://www.tsiphotography.co.uk/galleries/portraits-2021/ (new album set)
https://www.tsiphotography.co.uk/galleries/commercial/

Everything was working perfectly prior to the upgrade to BK4, since then neither the Portraits or Weddings Album, 502 bad gateway

Hi @mridley, thanks for the further info. I will look further into it via FTP to firstly see whether the requests are reaching Backlight and then to determine what’s causing the error.

Hi @mridley, I’ve found the underlying cause of this issue. Quite a tough one to work out and very obscure.

Our code for password protection uses cookies per album to mark whether a password has been successfully applied for each password-protected album. If it hasn’t been, the server tells the browser to remove the cookie, even if there isn’t a cookie to remove. Your Weddings album set has 60+ password-protected albums. This ‘delete cookie’ message for all of the albums exceeded the amount of data than the Nginx proxy in front of your site allows in response headers (the hidden data that is communicated between servers and browsers on page load) and threw the 502 Gateway Error.

This code for password handling is very, very old and predates my contributions to TTG. It has served us well and has never needed to be touched. I have disabled the line that tried to remove cookies, and don’t believe that it’s essential for the security of your galleries. I can’t access them without providing a password.

Can you check that you can log in to the child albums of the Weddings album set? Make sure that you’re not logged in as admin in the same browser.

Hi Ben,

Blooming awesome all seems to be working again :slight_smile: your a legend

2 Likes