First off, this is the best piece of software I’ve used for viewing family photos, so thank you!
I’m running PS Server v2.1.0-alpha.7 on Rocky Linux 9…I had switched to the Alpha version to workaround the ffmpeg “singlejpeg” bug.
When running Photostructure behind a reverse proxy (in my case, Apache), a “Not Connected (we’ll retry in a bit)” toast notification appears every 60 seconds.
If I increase Apache’s ProxyTimeout from 60 to 120, then the message appears every 120 seconds. So I can reduce the frequency of the message, but it’s still a bit distracting.
Looking at the Network inspector in the browser, I believe the /updates endpoint uses long polling, and the reverse proxy is closing the long-held connection when the timeout is reached.
As a workaround, you can set ProxyTimeout to a huge value, but this kinda goes against the spirit of how Apache designed their reverse proxying to work.
Expected Behavior
It’s my understanding that most reverse proxies do not hold standard HTTP connections open indefinitely. When running behind a reverse proxy, I would expect Photostructure to silently reopen the connection to the /updates endpoint and only show the toast notification when the reconnection fails.
Current Behavior
When running behind an Apache reverse proxy, a repeated toast notification is displayed on an interval corresponding to the server’s ProxyTimeout value.
Steps to Reproduce
- Run Photostructure behind an Apache reverse proxy, configured like so:
<VirtualHost *:443>
DocumentRoot "/var/www/html"
ServerName photos.mydomain.com
SSLEngine on
SSLCertificateFile /etc/pki/tls/certs/cert.pem
SSLCertificateKeyFile /etc/pki/tls/private/cert.key
# ProxyTimeout 60 (the default)
ProxyRequests Off
ProxyPreserveHost On
ProxyPass / http://127.0.0.1:8080/
ProxyPassReverse / http://127.0.0.1:8080/
RequestHeader set X-Forwarded-Proto "https"
RequestHeader set X-Real-IP %{REMOTE_ADDR}e
<Directory "/var/www/html">
AllowOverride None
Require all granted
</Directory>
</VirtualHost>
-
Open the Photostructure application in a web browser
-
Watch the notification appear every 60 seconds (or whatever value you configured for ProxyTimeout).
Environment
Rocky Linux 9 x86_64
Apache reverse proxy
Photostructure for Node v2.1.0-alpha.7