[Prefer pre-created thumbnails] Too many resourses used by phpThumb thumbnailing

More
8 years 2 weeks ago - 8 years 2 weeks ago #71518 by nikolaikolev
Hello friends
my hosting company stopped my FlexiContent web site as it was using way over the line server resources.
They have investigated the problem and they told me that the website is selfhitting itself over and over again and this is the reason for using way over the line server processor time.

They said that they can not fix the problem as only the developer can assist.
I enclose picture with the resources usage.
Please can you advice how can i fix this so the hosing company can put my website back online.

The selfhits are from the type:

164.138.218.16 - - [23/Jan/2018:18:45:20 +0200] "GET /components/com_flexicontent/librairies/phpthumb/phpThumb.php?src=/images/stories/pollo_resort_apartmets/pollo_resort_apartmets.jpg&w=240&h=180&aoe=1&q=95&zc=1&f=jpg HTTP/1.1" 403 269 "-" "-"
164.138.218.16 - - [23/Jan/2018:18:45:20 +0200] "GET /components/com_flexicontent/librairies/phpthumb/phpThumb.php?src=/images/stories/yujna_perla_sozopol/yujna_perla.jpg&w=240&h=180&aoe=1&q=95&zc=1&f=jpg HTTP/1.1" 403 269 "-" "-"
164.138.218.16 - - [23/Jan/2018:18:45:20 +0200] "GET /components/com_flexicontent/librairies/phpthumb/phpThumb.php?src=http://niktravel.com/images/stories/obzor_beach_reasort/obzor_beach_resort.jpg&w=240&h=180&aoe=1&q=95&zc=1&f=jpg HTTP/1.1" 403 269 "-" "-"
164.138.218.16 - - [23/Jan/2018:18:45:20 +0200] "GET /components/com_flexicontent/librairies/phpthumb/phpThumb.php?src=http://niktravel.com/images/stories/lalov_egreg/lalov_egreg.jpg&w=240&h=180&aoe=1&q=95&zc=1&f=jpg HTTP/1.1" 403 269 "-" "-"
Last edit: 8 years 2 weeks ago by ggppdk.

Please Log in or Create an account to join the conversation.

More
8 years 2 weeks ago #71522 by ggppdk
Hello

this will happen only if you configure to use too many on the fly thumbnailing
- like many modules with on the fly thumbnailing

2 things to do

- increase cache size and lifetime of phpThumb, especially the size

Edit file:
components/com_flexicontent/librairies/phpthumb/phpThumb.config_OVERRIDE.php
add:
Code:
$PHPTHUMB_CONFIG['cache_maxage'] = 86400 * 90; // delete cached thumbnails that haven't been accessed in more than [90 days] $PHPTHUMB_CONFIG['cache_maxsize'] = 500 * 1024 * 1024; // delete least-recently-accessed cached thumbnails when more than [500MB] $PHPTHUMB_CONFIG['cache_maxfiles'] = 30000; // delete least-recently-accessed cached thumbnails when more than [30000] cached files


- also best is this: edit configuration of unversal content module and select to use a fixed size thumnail of the image field

and if your articles are not using the image, then modify them to use it


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

Please Log in or Create an account to join the conversation.

More
8 years 2 weeks ago #71582 by nikolaikolev
Hello,

from:
components/com_flexicontent/librairies/phpthumb/phpThumb.config_OVERRIDE.php

do i have to remove:
$PHPTHUMB_CONFIG = 500 * 1024 * 1024; // 500 MBytes
$PHPTHUMB_CONFIG = 50000; // 50000 files
$PHPTHUMB_CONFIG = true; // Do not thumbnail non-local images

or i just leave it there ?

Please Log in or Create an account to join the conversation.

More
8 years 2 weeks ago #71583 by nikolaikolev
Hello,
where exactly can i find

use a fixed size thumnail of the image field

in universal content module?

Please Log in or Create an account to join the conversation.

More
8 years 2 weeks ago #71584 by ggppdk
Hello

using an already created thumbnail (fixed size) thumbnail has no performance cost

you can do with parameter:
"Display image:

at the drop-down instead of 'resize'
click and select an existing thumbnail


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

Please Log in or Create an account to join the conversation.

More
8 years 2 weeks ago #71606 by nikolaikolev
Hello,
is this the correct option (in the file attached) i must pick in order to stop the selfhitting ?
Universal content module - layout: news - tab Layout: Select Fields - (file attached)

Please Log in or Create an account to join the conversation.

More
8 years 2 weeks ago #71616 by ggppdk
Hello

that is correct


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

Please Log in or Create an account to join the conversation.

More
8 years 1 week ago #71642 by nikolaikolev
thank you very much.
I had a reply from the webhost that the PHP time has droped down after the changes but the SQL time is increasing.
They said that the reason for the increasing of the SQL is the "phpThumb.php".
They say that the "phpThumb.php" in generating the majority of the SQL time by making vast number of quick requests to the data base.
Is there any way to reduse these numerous number of request to the data base ?

Please Log in or Create an account to join the conversation.

More
8 years 1 week ago #71643 by ggppdk
Hello

You can tell them that
currently phpThumb is configured to make zero SQL queries

so can they be more specific of what SQL queries ?
if they are not specific of what they do not like
then i cannot reply, and what is considered high for a web-host


also you can can not host a website like yours
- in a shared webserver serving 300 other domains

even if the resource usage is relative small
you will have your webhost limiting your website randomly

currently domain is on 2-core VPS and it is average CPU usage is 5% - 10%

you should also enabling Joomla view caching in Global configuration

and also you can enable the Joomla system cache plugin, flexicontent is compatible with it too (just your views for visitors (unlogged users) will update every 15 minutes or as configured)


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

Please Log in or Create an account to join the conversation.

More
8 years 1 week ago #71694 by nikolaikolev
Hello,
is there any Joomla plug-in or exension that can tell me what is making SQL request ?

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline
Save