Search…

X3 Photo Gallery Support Forums

Search…
 
Vowel4912
Topic Author
Posts: 3
Joined: 16 Jun 2023, 03:57

Preview images sometimes do not load correctly

16 Jun 2023, 04:27

I've just started to set up my personal gallery with X3, and I've noticed that some images don't get a preview in the overview. Instead, the loading animation is shown for more than 10 minutes, probably indefinitely. 

The behaviour can be seen in this test gallery: http://zs8skbavix.preview.infomaniak.website/reisen/berlin/


I'm having a hard time debugging this problem at the moment, because when I click on one of the images, it loads just fine. Interestingly, it will affect different images every time I load the page. I think it's related to the resizing of the image, as the web server's error log shows some PHP deprecation errors, such as "PHP Deprecated: Creation of dynamic property resizer::$render is deprecated" However, I've tried with PHP 7.4 to 8.2 - so if this is the right track, either something is wrong with my hosting or it's a rare bug. I'm also wondering if the images should not be cached and already present in the right sizes on subsequent pages visists. 
Code

[Fri Jun 16 10:19:37.451120 2023] [fastcgi:error] [pid 88260:tid 140653191194368] [client 2a02:8071:8285:af20:4c09:5be6:cea0:33e5:0] FastCGI: server "/home/clients/d065a58118c82f0ed939361328465240/.config/apache/foto.dwaldmann.de/.fpm/php5.external" stderr: line 145; PHP message: PHP Deprecated: Creation of dynamic property resizer::$iptc is deprecated in /home/clients/d065a58118c82f0ed939361328465240/sites/customer/app/parsers/slir/index.php on line 146; PHP message: PHP Deprecated: Creation of dynamic property resizer::$source is deprecated in /home/clients/d065a58118c82f0ed939361328465240/sites/customer/app/parsers/slir/index.php on line 147; PHP message: PHP Deprecated: Creation of dynamic property resizer::$render is deprecated in /home/clients/d065a58118c82f0ed939361328465240/sites/customer/app/parsers/slir/index.php on line 201; PHP message: PHP Deprecated: Creation of dynamic property resizer::$cache_dir is deprecated in /home/clients/d065a58118c82f0ed939361328465240/sites/customer/app/parsers/slir/index.php on line 221, referer http://zs8skbavix.preview.infomaniak.website/reisen/berlin/
Attachments
CleanShot 2023-06-16 at 10.24.37@2x.png
CleanShot 2023-06-16 at 10.24.37@2x.png (598.48 KiB) Viewed 12374 times
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13998
Joined: 30 Sep 2006, 03:37

Re: Preview images sometimes do not load correctly

16 Jun 2023, 06:45

When checking from here, all the images loaded properly. Likely they were created and cached, although some error/timeout was blocking them. I'm not sure about the message in your error log, because that's just "deprecated".

ANYWAY, please please downgrade to PHP 8.1, as I haven't yet prepared X3 for PHP >=8.2 and those messages in your error log are definitely caused by this. If you continue to get errors after downgrading to PHP 8.1, then the issue is definitely not caused by the "deprecated message" in your error log, because that will not longer occur with PHP 8.1.

Hopefully it gets resolved, but if not, I need to be able to reproduce from here, and it would just seem your server is struggling to create multiple thumbnails perhaps simultaneously. It's certainly not an error if the images eventually get created, but something related to resources.
 
metallissimus
Experienced
Posts: 331
Joined: 17 Oct 2019, 06:54

Re: Preview images sometimes do not load correctly

16 Jun 2023, 07:02

mjau-mjau wrote: When checking from here, all the images loaded properly.
On my end I can reproduce the problem in Firefox, but not in Safari. Maybe that helps narrow it down.

There is one message in the console, I have no idea if this might be related:
Code
Source-Map-Fehler: Error: request failed with status 404 Ressourcen-Adresse: Source-Map-Adresse: /sm/32324c1d2813901422cacae3f1415436cce3b9904b6769c7215a52b9cc07b9a4.map
www.danielbollinger.de – corporate photography
hochzeiten.danielbollinger.de – wedding photography
 
Vowel4912
Topic Author
Posts: 3
Joined: 16 Jun 2023, 03:57

Re: Preview images sometimes do not load correctly

16 Jun 2023, 10:49

Thank you very much for your feedback! I've downgraded to PHP 8.1, increased the maximum script runtime to 180 seconds and the maximum memory usage to 1024 MB. I think the console message is about some minified css, if I understand it correctly. I will keep an eye on it. 
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13998
Joined: 30 Sep 2006, 03:37

Re: Preview images sometimes do not load correctly

16 Jun 2023, 22:12

Vowel4912 wrote: Thank you very much for your feedback! I've downgraded to PHP 8.1, increased the maximum script runtime to 180 seconds and the maximum memory usage to 1024 MB.
PHP 8.1 and increased memory should probably solve any issues.
metallissimus wrote:
Code
Source-Map-Fehler: Error: request failed with status 404 Ressourcen-Adresse: Source-Map-Adresse: /sm/32324c1d2813901422cacae3f1415436cce3b9904b6769c7215a52b9cc07b9a4.map
Just for reference *.map files are only used for debugging in browser console, and the browser will only try to load them when the console is open. They are used to map "minified" Javascript/CSS to source, so it's easier to debug. When these files don't exist, it's normal/harmless.
 
Vowel4912
Topic Author
Posts: 3
Joined: 16 Jun 2023, 03:57

Re: Preview images sometimes do not load correctly

19 Jun 2023, 12:42

Thanks for the help! The problem is apparently eliminated. 
 
User avatar
TristanJo
Experienced
Posts: 116
Joined: 10 Apr 2018, 02:57

Re: Preview images sometimes do not load correctly

06 Aug 2023, 06:02

mjau-mjau wrote:
Vowel4912 wrote: Thank you very much for your feedback! I've downgraded to PHP 8.1, increased the maximum script runtime to 180 seconds and the maximum memory usage to 1024 MB.
PHP 8.1 and increased memory should probably solve any issues.
metallissimus wrote:
Code
Source-Map-Fehler: Error: request failed with status 404 Ressourcen-Adresse: Source-Map-Adresse: /sm/32324c1d2813901422cacae3f1415436cce3b9904b6769c7215a52b9cc07b9a4.map
Just for reference *.map files are only used for debugging in browser console, and the browser will only try to load them when the console is open. They are used to map "minified" Javascript/CSS to source, so it's easier to debug. When these files don't exist, it's normal/harmless.
Hi~ karl~


Is there a solution I can try?
Attachments
Snipaste_2023-08-06_19-38-30.png
Snipaste_2023-08-06_19-38-30.png (626.47 KiB) Viewed 12212 times
Snipaste_2023-08-06_19-01-54.png
Snipaste_2023-08-06_19-01-54.png (13.33 KiB) Viewed 12215 times
Snipaste_2023-08-06_19-01-07.png
Snipaste_2023-08-06_19-01-07.png (16.32 KiB) Viewed 12215 times
Snipaste_2023-08-06_19-00-20.jpg
Snipaste_2023-08-06_19-00-20.jpg (459.85 KiB) Viewed 12215 times
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13998
Joined: 30 Sep 2006, 03:37

Re: Preview images sometimes do not load correctly

06 Aug 2023, 10:05

I need to see the problem before I can recommend a solution. Normally, 128MB will suffice for resizing images, but depends on how large your originals are. The "spinning" could be some other error, or network error, or maybe the shared resources are not sufficient (it sometimes will resize more than one image at a time. Also, I have never needed to increase execution time beyond default, as resized images should only take a few seconds ... If a process requires more than 30 seconds, it means the task(s) are very heavy or the shared CPU resources are insufficient.

I personally run > 100 X3 websites on $5 and $10 droplets on digitalocean.com, and have never had to wait more than a few seconds for thumbnails to process.