Search…

X3 Photo Gallery Support Forums

Search…
 
User avatar
Studio Graou
Topic Author
Posts: 13
Joined: 03 Jan 2016, 16:52

The image could not be loaded

09 Feb 2016, 04:24

Bonjour,
j'ai un bug sur l'affichage de certaines photos, le message "The image could not be loaded" apparaît à la place de l'image.

Pour moi la manipulation est simple, je clic sur The image, puis je rafraîchis la page pour qu'elle s'affiche de nouveau.

Le gros problème est que mes galeries sont destinées à mes clients, qui sont hyper néophytes et incapables de savoir qu'il faut cliquer sur image, même avec un lien surligné :p

Le bug est aléatoire, car sur d'autres ordinateurs les images non affichées sont différentes, c'est comme ci il y avait un problème avec le cache sur les postes clients. Donc le problème ne viendrait pas du cache de X3, mais du transfert sur le cache client.

- Comment résoudre ce problème pour ne pas avoir ce désagrément chez mes clients ?
- Est-il possible de remplacer le texte par une version traduite ?

Merci :)
Belle journée
Attachments
Sans-titre-1.jpg
Sans-titre-1.jpg (76.3 KiB) Viewed 5314 times
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13997
Joined: 30 Sep 2006, 03:37

Re: The image could not be loaded

09 Feb 2016, 10:12

I have diagnosed your issue, and I have found the explanation ... It is a bit technical:

First of all, this is the FULL size image, OK:
http://galerie.studiograou.com/content/ ... SL_340.jpg

This is a SMALL resized image, OK:
http://galerie.studiograou.com/render/w ... SL_340.jpg

This is a LARGE resized image, NOT ok:
http://galerie.studiograou.com/render/w ... SL_340.jpg
Image

You are getting an error on this image, because the combination of your limited server-memory and the specific aspect ratio of the image. You simply do not have enough server memory resources to resize this image to the width1280 size (which is the biggest X3 resize). I checked your server diagnostics:
http://macbook.local/x3/?diagnostics

... All good, but there is something strange going on here. This is your own server or something? The memory capacity looks impressive, and certainly doesn't look like a shared server. However, those numbers are incorrect, or there is something else on your server that is limiting your resources. In fact, I tested the resizing capabilities, and found the exact limit for this image, which is width 1048.
http://galerie.studiograou.com/render/w ... SL_340.jpg WORKS
http://galerie.studiograou.com/render/w ... SL_340.jpg ERROR

... This is because any resize request > 1049 width (for this specific TALL image), will cause a server error because your resources have been limited somehow. Furthermore, this issue would only happen on your server for TALL portrait-aspect images.

So basically you may want to check with your server host why this memory-limitation, and why it is defined incorrectly in diagnostics.

Why does it work from some computers/devices? It works here for example, because I am on a high-res retina screen, so X3 knows it needs the biggest image, which is the original (not resized). Also, on smaller devices, it may request the width1024 version, which works fine. However, on some screens, it will request the 1280 width version, and this creates the error.

I may need to add a resize-limitation setting for servers that are limited by memory. However, your server seems a bit "special" ... Some custom server? Sorry for the technical explanation, but it was necessary.
 
User avatar
Studio Graou
Topic Author
Posts: 13
Joined: 03 Jan 2016, 16:52

Re: The image could not be loaded

09 Feb 2016, 19:02

J'utilise un serveur VPS chez OVH, la galerie fonctionne en PHP version 7.0.2, j'ai attribué 2048M pour la memory limit, le processeur est un Xeon 2 cores fonctionnant avec Plesk 12 sour CentOS 6.7, autant dire que ce n'est pas un serveur mutualisé ou standard.

Je remarque aussi que le problème viens des images en mode portrait.
Pourtant ça le fait sur certaine et d'autres.

J'utilise X3 pour créer des galerie planches contact dont les images font 3425x2362px, et il n'y a aucun problème.
Et pour cette galerie qui bug, les images font 1600px max de largeur ou hauteur.

Ou si je comprend bien, mon serveur aurait du mal a redimensionner certaines images. Mais pourquoi ?
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13997
Joined: 30 Sep 2006, 03:37

Re: The image could not be loaded

09 Feb 2016, 23:14

To be honest, I didn't understand why this was happening ... There should be a "safety-valve" in X3 to prevent TALL images from trying to resize at width 1280px ... Tall images resized at 1280 px width, usually means something around 1280 x 1920 px, which often exhausts a a standard PHP 8 MB memory limit. I am looking into our code as we speak, and I see there is a flaw ... This should be fixed in a new X3 release next week!
Studio Graou wrote:Ou si je comprend bien, mon serveur aurait du mal a redimensionner certaines images. Mais pourquoi ?
Your server certainly has a memory limit for processes, and it is not at 2048M as diagnostics says. That memory is in places, but it's certainly not available always ... You are sharing resources somehow. The math below is simple and proves there is a limit on your server:

For this image, anything 1049 width and over, will fail:
w1049
(EDIT: After checking later, suddenly this request worked ... This proves that your server memory resources are fluctuating. Even the W1280 image requested worked suddenly: https://d.pr/i/LVBD). Confusing!

Anything 1048 width and below, will succeed:
w1048
Studio Graou wrote:Je remarque aussi que le problème viens des images en mode portrait.
Pourtant ça le fait sur certaine et d'autres.
Why this image specifically?
Because it depends on the aspect-ratio, orientation, image-bits, image-channels and the visitors screen size (which decides what image size to request). This is a TALL image, which means a width-1280 request requires a 1280 x 1920 px images (which fails resize on your server). As mentioned, I will fix it in next X3 release. It works different for other images that are not tall, because they can handle a much wider resize-request, exceeding the requirements of X3.

Edit: I did some further research on your server, and it seems the resources available fluctuates. Sometimes I can request a large image, other times it fails. The resources may be limited relative to the resource-usage from other users. Your 2048M is far from guaranteed at any point in time it seems.

Check this, at some point w2180 worked:
Image
... and another time, I get ERROR for a much lower request:
Image
... then suddenly works again for a bigger size request:
Image

Your server may be "virtual dedicated", but it is still sharing resources with others and the resources (performance) is fluctuation. This is a bit poor from OVH if you ask me ... What plan are you using? But ok, regardless of this, next fix will prevent TALL images from being requested at 1280px width ... even though your server should be able to handle them.
 
User avatar
Studio Graou
Topic Author
Posts: 13
Joined: 03 Jan 2016, 16:52

Re: The image could not be loaded

10 Feb 2016, 04:44

La faute serait du en partie a mon serveur qui ne délivrerait pas suffisamment de ressources a un moment donné et de l'autre partie a une faille de X3.

Pour l'image http://galerie.studiograou.com/render/w ... SL_340.jpg qui ne fonctionner pas, il semblerait que X3 reste sur l'erreur et ne cherche pas a rafraichir l'image, je ne suis pas connaisseur, je ne fais que des suppositions.

J'utilise le plan OVH VPS 2016 Cloud 2 https://www.ovh.com/fr/vps/vps-cloud.xml

Dois-je attendre la prochaine mise à jour, où je peux tenter de faire quelque chose de mon côté ?
Si vous avez besoin de plus de renseignement sur la configuration de mon serveur, demandé, je ferais de mon mieux pour vous aider et aider la communauté.

Sinon, comment traduire le bout de texte ?
 
User avatar
Studio Graou
Topic Author
Posts: 13
Joined: 03 Jan 2016, 16:52

Re: The image could not be loaded

10 Feb 2016, 05:10

Si cela peut aider voici un partie du log pour l'image http://galerie.studiograou.com/mariage/ ... 130-sl-577
Attachments
Sans-titre-2.jpg
Sans-titre-2.jpg (141.45 KiB) Viewed 5290 times
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13997
Joined: 30 Sep 2006, 03:37

Re: The image could not be loaded

10 Feb 2016, 12:19

Studio Graou wrote:Pour l'image http://galerie.studiograou.com/render/w ... SL_340.jpg qui ne fonctionner pas, il semblerait que X3 reste sur l'erreur et ne cherche pas a rafraichir l'image, je ne suis pas connaisseur, je ne fais que des suppositions.
Correct. X3 caches both requests and images. You can empty the folders /app/_cache/images/rendered/ and /app/_cache/images/request/ by FTP to force-refresh requests and cached images. It will only help if your server can handle the resize-requests better ...
Studio Graou wrote:I use the OVH VPS Plan 2016 Cloud 2 https://www.ovh.com/fr/vps/vps-cloud.xml
Looks good, and the price is cheap. Hopefully it's not over-shared, as it seems like you had some problems with memory that even shared-servers can handle. I would expect that they should guarantee at least some minimum resources all the time.
Studio Graou wrote:Dois-je attendre la prochaine mise à jour, où je peux tenter de faire quelque chose de mon côté ?
Si vous avez besoin de plus de renseignement sur la configuration de mon serveur, demandé, je ferais de mon mieux pour vous aider et aider la communauté.
The next release (next week) will likely solve your issue, regardless. TALL (portrait) images will get requested at maximum w1024, not 1280, which caused "exhausted memory" on your server (at least at some point in time).
Studio Graou wrote:Si cela peut aider voici un partie du log pour l'image http://galerie.studiograou.com/mariage/ ... 130-sl-577
A bit sad that your server does not even manage to resize the image to width1024:
http://galerie.studiograou.com/render/w ... SL_577.jpg

Standard shared servers can do that.
 
User avatar
Studio Graou
Topic Author
Posts: 13
Joined: 03 Jan 2016, 16:52

Re: The image could not be loaded

12 Mar 2016, 08:54

Bonjour,
je venais au nouvelles pour savoir si il y a eu une mise à jour depuis ?
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13997
Joined: 30 Sep 2006, 03:37

Re: The image could not be loaded

13 Mar 2016, 00:59

Studio Graou wrote:je venais au nouvelles pour savoir si il y a eu une mise à jour depuis ?
In next release (pending), portrait aspect images will be resized to MAX 1024px width, and this will protect your server from resize-requests that i can not handle. I cannot currently see your server has this issue (unless available resources are fluctuating)
http://galerie.studiograou.com/render/w ... SL_340.jpg
mjau-mjau wrote:Edit: I did some further research on your server, and it seems the resources available fluctuates. Sometimes I can request a large image, other times it fails. The resources may be limited relative to the resource-usage from other users. Your 2048M is far from guaranteed at any point in time it seems.
If your server resources keep on fluctuating, sometimes below a standard minimum, then of course we cannot guarantee that your server is capable of resizing all images. I have never heard of this before.