Search…

X3 Photo Gallery Support Forums

Search…
 
User avatar
BjoernG
Topic Author
Posts: 21
Joined: 31 Mar 2014, 02:32

Spinning circle / image fullscreen option

19 Aug 2017, 07:17

Hi
Two questions: thumbnail image in gallery/carousel does sometimes load forever (spinning circle). After refreshing the page the preview pictures are shown as expected, example:  Image

hint: using flarecode

second question: how to set the fullscreen option on all pages (upper right corner)?
hint: got the icon on the index site - http://www.gosswiler.com (only with IE not with chrome) and disappears when I try to click on it
 
Image

I'd like to set it the fullscreen option on all gallery albums... is that possible?

thanks in advance
Bjoern / gosswiler.com
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13998
Joined: 30 Sep 2006, 03:37

Re: Spinning circle / image fullscreen option

19 Aug 2017, 10:26

BjoernG wrote:Two questions: thumbnail image in gallery/carousel does sometimes load forever (spinning circle). After refreshing the page the preview pictures are shown as expected, example:
  • You are getting a few "internal server errors" on some image requests randomly screenshot.
  • Your server is definitely struggling. If it is because your originals are massive (1.5MB 2400px), AND the carousel is making multiple resize requests, and/or because your server is using some internal Varnish cache system I don't know.
  • I think it's safe to assume this not a standard hosting setup? The server itself seems powerful/modern as far as I can see, but custom setups means inconsistencies.
  • Assuming this is a relatively new folder? X3 will have to process and resize all images on output, because they are stored in X3's image cache. I would suggest you go through all images and make sure they load, and see if the issue persists.
  • Generally, as in the screenshot below, it loads fine ... However, when images fail, it is your server struggling (because of one of the combinations mentioned above).
Image
BjoernG wrote:hint: using flarecode
It would have nothing to do with Cloudflare. Cloudflare may cache images, but everything needs to be processed, resized and output from the origin server. Furthermore, Cloudflare CDN will only serve a cached image to a visitor if it is already cached on the specific cloudflare region of the specific visitor (there are 100's of CF edge servers).
BjoernG wrote:second question: how to set the fullscreen option on all pages (upper right corner)?
hint: got the icon on the index site - http://www.gosswiler.com (only with IE not with chrome) and disappears when I try to click on it
 
Image
This screenshot is from the slideshow plugin specifically, which isolates the slideshow, and takes it into fullscreen mode (no scroll). Although it is possible to "take the entire browser fullscreen", apart from the slideshow, there is no way to specifically take any gallery into fullscreen (what should it look like?). Although we could add a generic "fullscreen button", it would not be gallery-specific ... It would simply take the browser into fullscreen mode.
 
User avatar
BjoernG
Topic Author
Posts: 21
Joined: 31 Mar 2014, 02:32

Re: Spinning circle / image fullscreen option

19 Aug 2017, 12:56

  • Your server is definitely struggling. If it is because your originals are massive (1.5MB 2400px), AND the carousel is making multiple resize requests, and/or because your server is using some internal Varnish cache system I don't know.
you are right, the hoster provide varnish cache - I disabled it now, just to see if that helps. What image size do you recommend? My export setting is 2048x.... with 90% quality. 
  • Assuming this is a relatively new folder? X3 will have to process and resize all images on output, because they are stored in X3's image cache. I would suggest you go through all images and make sure they load, and see if the issue persists.
no, some folders are quite old (> 1 year) - but from time to time I delete the cache.... maybe after that the images have to be resized and cached again?...
Bjoern / gosswiler.com
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13998
Joined: 30 Sep 2006, 03:37

Re: Spinning circle / image fullscreen option

20 Aug 2017, 00:11

Although clearly a server-related issue ("internal server error" for random image requests), I am not 100% sure I can pinpoint the exact reason. One would assume it's related to simultaneous image-resize requests (from the carousel) for multiple extra-large images. However, since resized images get cached in X3 (stored in the _cache/images folder), the issue should resolve itself after a short while after the images have rendered at least once.

For the sake of elimination, can you try to pen file app/parsers/slir/slirconfig.class.php, and locate the line:
Code
if(stripos($_SERVER['SERVER_SOFTWARE'], 'iis') !== false) self::$useRequestCache = FALSE;
Change it to:
Code
self::$useRequestCache = FALSE;
BjoernG wrote:What image size do you recommend? My export setting is 2048x.... with 90% quality.
Unless the above has any effect, original image size vs resizing/memory is still the main suspect, possibly in combination with some unknown factor. Normally, we recommend "1600px" long side for original uploaded images, which is usually a good balance between quality, dimensions and file size for the web.
BjoernG wrote:you are right, the hoster provide varnish cache - I disabled it now, just to see if that helps.
Doesn't seem to have any effect. I don't think "varnish cache" will provide any benefits either, at least not for X3. For varnish to provide any benefit, it would have to be configured to cache X3 pages and images, which I can't see that it is doing ... If it did, there would have to be a mechanism in your Varnish config to refresh a request after you make changes (to a page or image).
BjoernG wrote:no, some folders are quite old (> 1 year) - but from time to time I delete the cache.... maybe after that the images have to be resized and cached again?...
What cache are you deleting? You can only delete the image cache manually by FTP, as image cache is not affected by the "clear cache" option in X3 panel tools, which is only for pages. Keep in mind, if you rename/move any file/folder, images within will get new URL paths, which causes new resize requests.
 
User avatar
BjoernG
Topic Author
Posts: 21
Joined: 31 Mar 2014, 02:32

Re: Spinning circle / image fullscreen option

20 Aug 2017, 04:55

What cache are you deleting? You can only delete the image cache manually by FTP, as image cache is not affected by the "clear cache" option in X3 panel tools, which is only for pages. Keep in mind, if you rename/move any file/folder, images within will get new URL paths, which causes new resize requests.
Ok, good to know - I deleted the _cache folder just once, after upgrading to release 03.23. What I meant with deleting cache was in the admin panel -> Flush Current or all Pages (thought that after that the pics has to be rendered again, but I'm wrong as you wrote)
Image
For the sake of elimination, can you try to pen file app/parsers/slir/slirconfig.class.php, and locate the line
I modified the file as you expected:
Code
self::$useRequestCache = FALSE;

Off topic question
just what I experienced during testing the pic issue:
for example you'd like to send someone only the link from a specific gallery/album e.g. album link then this person doesn't get the navigation buttons bellow the dots:
Image
but when you navigate through the top menu, it shows the navigation as it should (tested with chrome and IE)
Image
the second issue I experienced, 
sometimes the blog navigation doesn't work - I mean it shows the articles but when you click on the article, you get lost with a blank page (only sometimes...strange) Example: navigate to e.g. "Fuerte..."
Image
sometimes you end up with a black (blank) screen
Image

hint: In this particular case, the URL doesn't change 
instead of navigating to
btw, I'm not a web server admin, but may it makes sense for you! Error log on my admin panel from my hoster, does this mean that the server ran out of memory?
Code
[Sun Aug 20 11:11:40.136535 2017] [:error] [pid 343456:tid 140351553615616] (12)Cannot allocate memory: [client 162.158.150.11:52235] couldn't create child process: /opt/suphp/sbin/suphp for /home/gosswile/public_html/app/parsers/slir/index.php, referer: https://gosswiler.com/blog/OZ-Trip-2016/
[Sun Aug 20 11:11:40.123398 2017] [:error] [pid 343354:tid 140351679493888] (12)Cannot allocate memory: [client 162.158.150.101:52236] couldn't create child process: /opt/suphp/sbin/suphp for /home/gosswile/public_html/app/parsers/slir/index.php, referer: https://gosswiler.com/blog/OZ-Trip-2016/
[Sun Aug 20 11:11:40.109475 2017] [:error] [pid 343268:tid 140351637534464] (12)Cannot allocate memory: [client 162.158.150.95:52232] couldn't create child process: /opt/suphp/sbin/suphp for /home/gosswile/public_html/app/parsers/slir/index.php, referer: https://gosswiler.com/blog/OZ-Trip-2016/
[Sun Aug 20 11:09:25.390469 2017] [:error] [pid 343296:tid 140351778227968] (12)Cannot allocate memory: [client 162.158.150.101:51979] couldn't create child process: /opt/suphp/sbin/suphp for /home/gosswile/public_html/app/parsers/slir/index.php, referer: https://gosswiler.com/galleries/climb/acherli/
[Sun Aug 20 11:09:22.972623 2017] [:error] [pid 343354:tid 140351669004032] (12)Cannot allocate memory: [client 162.158.150.65:51969] couldn't create child process: /opt/suphp/sbin/suphp for /home/gosswile/public_html/app/parsers/slir/index.php, referer: https://gosswiler.com/galleries/climb/acherli/
[Sun Aug 20 11:09:01.218801 2017] [:error] [pid 343325:tid 140351522146048] (12)Cannot allocate memory: [client 162.158.150.11:51942] couldn't create child process: /opt/suphp/sbin/suphp for /home/gosswile/public_html/app/parsers/slir/index.php, referer: https://gosswiler.com/blog/Fuerteventura/
[Sun Aug 20 11:08:39.465564 2017] [:error] [pid 343384:tid 140351511656192] (12)Cannot allocate memory: [client 162.158.150.17:51905] couldn't create child process: /opt/suphp/sbin/suphp for /home/gosswile/public_html/app/parsers/slir/index.php, referer: https://gosswiler.com/

Sorry for bothering you, but I thought it probably helps to improve the code for future releases...
Bjoern / gosswiler.com
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13998
Joined: 30 Sep 2006, 03:37

Re: Spinning circle / image fullscreen option

20 Aug 2017, 06:13

BjoernG wrote:What I meant with deleting cache was in the admin panel -> Flush Current or all Pages (thought that after that the pics has to be rendered again, but I'm wrong as you wrote)
Yep, anyway this mechanism is only for pages and does not affect images, which automatically cache on cloudflare regardless.
BjoernG wrote:I modified the file as you expected:
Code
self::$useRequestCache = FALSE;
Doesn't seem to have any effect.

As mentioned, you are getting "500 internal server error" for some image requests [screenshot]. Yet, when I open the same request separately in browser, it seems to load the image. I am not 100% it's the resize/memory issue either, since these images already seem processed/cached. If you want to solve it 100%, you will need to find your error log (or ask your host for this) to find the reason why these image requests inconsistently create the error.
BjoernG wrote:Off topic question
just what I experienced during testing the pic issue:
for example you'd like to send someone only the link from a specific gallery/album e.g. album link then this person doesn't get the navigation buttons bellow the dots:
but when you navigate through the top menu, it shows the navigation as it should (tested with chrome and IE)
Can't confirm. If I click on the link or navigate directly to the page, it shows the below on mouse movement. This interface is only for mouse pointer devices, and these buttons will only show on mouse movement within the carousel area. They will also autohide after mouse inactivity.
Image
BjoernG wrote:the second issue I experienced, 
sometimes the blog navigation doesn't work - I mean it shows the articles but when you click on the article, you get lost with a blank page (only sometimes...strange) Example: navigate to e.g. "Fuerte..."
sometimes you end up with a black (blank) screen
Can't confirm this from here. I clicked through your blog carousel menu without problems. Specifically from blog page to fuerteventura. If this is something related to some combination with cloudflare apps, site preload and some browser extension, I don't know .... but I can't reproduce it from here, and this has not been reported by anyone.
BjoernG wrote: btw, I'm not a web server admin, but may it makes sense for you! Error log on my admin panel from my hoster, does this mean that the server ran out of memory?
Code
[Sun Aug 20 11:11:40.136535 2017] [:error] [pid 343456:tid 140351553615616] (12)Cannot allocate memory: [client 162.158.150.11:52235] couldn't create child process: /opt/suphp/sbin/suphp for /home/gosswile/public_html/app/parsers/slir/index.php, referer: https://gosswiler.com/blog/OZ-Trip-2016/
[Sun Aug 20 11:11:40.123398 2017] [:error] [pid 343354:tid 140351679493888] (12)Cannot allocate memory: [client 162.158.150.101:52236] couldn't create child process: /opt/suphp/sbin/suphp for /home/gosswile/public_html/app/parsers/slir/index.php, referer: https://gosswiler.com/blog/OZ-Trip-2016/
[Sun Aug 20 11:11:40.109475 2017] [:error] [pid 343268:tid 140351637534464] (12)Cannot allocate memory: [client 162.158.150.95:52232] couldn't create child process: /opt/suphp/sbin/suphp for /home/gosswile/public_html/app/parsers/slir/index.php, referer: https://gosswiler.com/blog/OZ-Trip-2016/
[Sun Aug 20 11:09:25.390469 2017] [:error] [pid 343296:tid 140351778227968] (12)Cannot allocate memory: [client 162.158.150.101:51979] couldn't create child process: /opt/suphp/sbin/suphp for /home/gosswile/public_html/app/parsers/slir/index.php, referer: https://gosswiler.com/galleries/climb/acherli/
[Sun Aug 20 11:09:22.972623 2017] [:error] [pid 343354:tid 140351669004032] (12)Cannot allocate memory: [client 162.158.150.65:51969] couldn't create child process: /opt/suphp/sbin/suphp for /home/gosswile/public_html/app/parsers/slir/index.php, referer: https://gosswiler.com/galleries/climb/acherli/
[Sun Aug 20 11:09:01.218801 2017] [:error] [pid 343325:tid 140351522146048] (12)Cannot allocate memory: [client 162.158.150.11:51942] couldn't create child process: /opt/suphp/sbin/suphp for /home/gosswile/public_html/app/parsers/slir/index.php, referer: https://gosswiler.com/blog/Fuerteventura/
[Sun Aug 20 11:08:39.465564 2017] [:error] [pid 343384:tid 140351511656192] (12)Cannot allocate memory: [client 162.158.150.17:51905] couldn't create child process: /opt/suphp/sbin/suphp for /home/gosswile/public_html/app/parsers/slir/index.php, referer: https://gosswiler.com/[/quote]
Well, this confirms that the problem you have with images is definitely related to server memory insufficiency. The script slir/index.php is responsible for resizing and serving images. Still seems a bit strange, and I am not sure about this "suphp", seemingly https://www.suphp.org/Home.html. As mentioned, a very custom setup on this server, unfortunately leaving it prone to issues.
 
User avatar
BjoernG
Topic Author
Posts: 21
Joined: 31 Mar 2014, 02:32

Re: Spinning circle / image fullscreen option

20 Aug 2017, 08:00

ok, let's stop here for the moment, I sent an email to my hoster to check the memory errors.... If I'm not getting a satisfactory response, I should consider changing the hosting provider. Could you give me an advice for some good hosting platforms in Europe? 
Bjoern / gosswiler.com
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13998
Joined: 30 Sep 2006, 03:37

Re: Spinning circle / image fullscreen option

20 Aug 2017, 10:26

Let's see what they say, but I wouldn't blame them immediately. It is pretty standard to have limited memory resources on shared (low-level) hosting. After all, your images are very large (2400px) and require exponentially more memory for the resize process. This is one of the reasons we have DEFAULT "resize to 1600px" in the X3 panel uploader,  else we would have many more users with similar issues wondering what's wrong ... Of course, X3 cannot bypass server memory issues when it comes to resizing an image. I must admit though, I haven't quite seen the issue occur quite like in your case ... normally, an image resize will either fail (insufficient memory) or succeed consistently, not randomly.

For memory calculation reference [link], a 2400px image requires 2-3 x the memory amount as when resizing the same image from 1600px.

Hosting
There is of course our own flamepix hosting, which can handle anything and has many benefits, but is expensive. Apart from that, there is an old thread here with user-recommended hosts. I can't personally recommend anything specific, but price is usually proportional with performance.
 
User avatar
BjoernG
Topic Author
Posts: 21
Joined: 31 Mar 2014, 02:32

Re: Spinning circle / image fullscreen option

29 Aug 2017, 02:26

Although I resized some galleries to 1600px it didn't perform on that server.

After dealing with the provider and not getting a reasonable answer (odd server config) I tried another hoster were the whole page runs as I expected...
As a result of this, I'm going to move my page to the new provider.

Thanks anyway for the great support
Bjoern / gosswiler.com
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13998
Joined: 30 Sep 2006, 03:37

Re: Spinning circle / image fullscreen option

29 Aug 2017, 04:43

:thumbsup: