No bug Pages give 504 error after installing plugin

  • Frank van der Meer
  • Topic Author
  • Offline
More
2 months 1 week ago #3371 by Frank van der Meer
Pages give 504 error after installing plugin was created by Frank van der Meer
Hi Ruud,
Today I bought your image optimizer. Installation on my testsite went great, but when I activated it, the pages are very very slow at first. I get a 504 Gateway Time-out. After that, the page opens a lot quicker.I'm hesitant to install the plugin on my live site, because it would initially make all my pages very slow. Are you familiar with this, and is there a solution for it in the plugin?You can see for yourself. I've already clicked on the first few pages on this page, so they open quickly. But if you click on a few pages further down, you'll see how slowly they open:https://frankblogt.nl/mooie-wandelingen/nieuwe-wandelingen-op-een-rijI'd love to hear from you. I can give you access to the backend, but I don't know how to do that securely.Regards,Frank
The topic has been locked.
More
2 months 1 week ago #3372 by Ruud van Lent
Replied by Ruud van Lent on topic Pages give 504 error after installing plugin
Hi Frank,
thanks for subscribing to ochResponsiveImages.

What you see is what is 'expected' and can be changed via the configuration.

When ochResponsiveImages is enabled and you visit a page on the front-end, it will create 'cached' images in different sizes for the image on that page. When you visit the page a second (or more) time, then this image creation is not needed as the cache images are already created.
creating the images takes time, cpu and memory and when e.g. on a shared hosting provider that is ower on specs, this can lead to a 504 or another timeout / out of memory respond.

So how to overcome this?

In the plugin settings, [Advanced]  tab, set the following settings:
1. Force (Re)Create Cache = No
2. Create Responsive Images Cache = Always
3. Limit Image Cache creation = 1

The 'trick' here is in the 'Limit Image Cache creation', when you set that to 0, the it will create cached images for all images it finds on a page, when you set that to 1, it will create one cached image on each visit. So when there are 3 images on the page, after three visits all images are cached.

This will limit the load on your server and prevent timeouts.

Can you give that a try?

PS. when you click [Toggle inline Help]  button (top right) in the configuration, you will see help text on each configuration field.
The topic has been locked.
  • Frank van der Meer
  • Topic Author
  • Offline
More
2 months 1 week ago #3373 by Frank van der Meer
Replied by Frank van der Meer on topic Pages give 504 error after installing plugin
Hi Ruud,
I hoped it would be something like that, thanks, also for the quick reply!

Another question: how can I test this? For example, if I reload the page below multiple times with the new plugin settings (clearing the cache a few times in between), I see that the JPGs are still all displayed as JPGs. Not as webp.

Does it take time, or do the visitors have to come from different IP’s?

frankblogt.nl/pieterpad/pieterpad-etappe...terburen-naar-winsum

Regards, Frank
The topic has been locked.
More
2 months 1 week ago #3374 by Ruud van Lent
Replied by Ruud van Lent on topic Pages give 504 error after installing plugin
Hi Frank,
on the page you shared I do not see the plugin enabled / in action. So something is not correct.

Is it possible for me to login to the backend so i can see / debug this?

You can mail me at info [at] onlinecommunityhub.nl
The topic has been locked.
More
2 months 1 week ago #3375 by Ruud van Lent
Replied by Ruud van Lent on topic Pages give 504 error after installing plugin
Hi frank,
as we resolved this via email I'll be closing this topic.
if you have any other questions or concerns feel free to open a new topic.

regards,
Ruud.
The topic has been locked.