Very long Time to First Byte on hosting with opcode XCache
Easy to use and free Joomla module to display weather with forecast from Yahoo.
Rate this topic:
- GK User
- Mon Aug 18, 2014 10:16 am
Dear Gavick
Our Webhosting provider WEDOS (www.wedos.cz) set opcode cache for PHP - XCache for all webservers befor 14 days.
All websites, where is active module Weather GK4 (), are suddenly slowed down.
By testing on http://webpagetest.wedos.com or http://tools.pingdom.com, I found that changing the Time to First Byte from 1 second to 12 seconds.
I tried different settings module, mainly cache settings, but without result.
There are 2 samples of webiste with slow module Weather Gk4:
http://www.joomlapolis.cz/test/silvarium2/ - template NEWS
http://www.joomlapolis.cz/test/silvtest/ - template NEWS2
best regards
Jindrich Ekart
Our Webhosting provider WEDOS (www.wedos.cz) set opcode cache for PHP - XCache for all webservers befor 14 days.
All websites, where is active module Weather GK4 (), are suddenly slowed down.
By testing on http://webpagetest.wedos.com or http://tools.pingdom.com, I found that changing the Time to First Byte from 1 second to 12 seconds.
I tried different settings module, mainly cache settings, but without result.
There are 2 samples of webiste with slow module Weather Gk4:
http://www.joomlapolis.cz/test/silvarium2/ - template NEWS
http://www.joomlapolis.cz/test/silvtest/ - template NEWS2
best regards
Jindrich Ekart
-
- Senior Boarder
- GK User
- Mon Aug 18, 2014 3:42 pm
The data for Weather is generated based on yahoo feed and this cURL operation may take time. Did you try to enable cache in module?
-
- Platinum Boarder
- GK User
- Tue Aug 19, 2014 7:45 am
Yes, I tried both - enable cache ON and cache time 30,60,90 minutes and disable cache ( cache OFF). Result is same - very long time Time to First Byte.
When I disable module Weather, TTFB is normal.
When I disable module Weather, TTFB is normal.
-
- Senior Boarder
- GK User
- Tue Aug 19, 2014 9:44 am
There are no code inside Weather which may produce this issue. Process which match icons to current conditions may take some time but there is no way to avoid that using icon sets. If you switch icons to yahoo default icons the same happen?
-
- Platinum Boarder
- GK User
- Tue Aug 19, 2014 10:09 am
I found that problem is in test for cache time setting in file helper.php (row 224):
(filesize(realpath('cache/mod_weather.bxml')) == 0 || ((filemtime(realpath('cache/mod_weather.bxml')) + $this->config['cacheTime'] * 60) < time()))
I have set cache time for 180 minutes but every time again downloads a file from Yahoo.
And other problem is in setting for CURLOPT_TIMEOUT in file helper.php (row 238 and 285)
curl_setopt($curl, CURLOPT_TIMEOUT, 20);
When I try change this code to:
curl_setopt($curl, CURLOPT_TIMEOUT, 1);
the responses from the server was 1 second, and the page is loading quickly
(filesize(realpath('cache/mod_weather.bxml')) == 0 || ((filemtime(realpath('cache/mod_weather.bxml')) + $this->config['cacheTime'] * 60) < time()))
I have set cache time for 180 minutes but every time again downloads a file from Yahoo.
And other problem is in setting for CURLOPT_TIMEOUT in file helper.php (row 238 and 285)
curl_setopt($curl, CURLOPT_TIMEOUT, 20);
When I try change this code to:
curl_setopt($curl, CURLOPT_TIMEOUT, 1);
the responses from the server was 1 second, and the page is loading quickly
-
- Senior Boarder
- GK User
- Thu Aug 21, 2014 2:28 pm
Please check this fixes » https://github.com/GavickPro/Weather/co ... 98ecf8427e
Set time to 1 probably will cause that you will not load feed from Yahoo - 1 second is to less to load feed via cURL.
Set time to 1 probably will cause that you will not load feed from Yahoo - 1 second is to less to load feed via cURL.
-
- Platinum Boarder
- GK User
- Wed Aug 27, 2014 12:15 pm
Thank you very much for fix module Weather.
In Weather module now works test for the presence of XML file from Yahoo and webpage loading time is now OK.
The problem is solved.
In Weather module now works test for the presence of XML file from Yahoo and webpage loading time is now OK.
The problem is solved.
-
- Senior Boarder
- GK User
- Fri Aug 29, 2014 10:36 am
Thanks for your tips, hope that latest update commit resolve problems with long website loading.
-
- Platinum Boarder
8 posts
• Page 1 of 1