When I first visit a site, it takes 3 second for the page to show. When reloading it loads at once.
When executing the MySQL commands directly on the server it respons as usual.
If waiting a couple of minutes, it is back to the 3 second wait.
Debug shows:
On reload is shows:Debug: (0.023953) - (net usage: 1650960) - (peak: 2013208)
SELECT item_id,url FROM cms_module_lisevideoer_item WHERE url != ''
Debug: (0.026259) - (net usage: 1748224) - (peak: 2110472)
End of Loading Modules
Debug: (0.028274) - (net usage: 1773584) - (peak: 2135832)
SELECT * FROM cms_mod_cmsjobmgr WHERE start < UNIX_TIMESTAMP() AND created < UNIX_TIMESTAMP() ORDER BY errors ASC,created ASC LIMIT 1
Debug: (0.028649) - (net usage: 1779880) - (peak: 2142128)
SELECT * FROM cms_content WHERE content_id = 4 LIMIT 1
Debug: (0.029817) - (net usage: 1875968) - (peak: 2238216)
UPDATE cms_siteprefs SET sitepref_value = 1498562490 WHERE sitepref_name = 'CmsJobManager_mapi_pref_last_async_trigger'
Debug: (3.03503) - (net usage: 1811816) - (peak: 2238216)
Initialize Smarty
Debug: (3.035046) - (net usage: 1811976) - (peak: 2238216)
Done Initialiing Smarty
So I think it has something to do with whats happening between Loading Modules and Initialize Smarty.Debug: (0.045961) - (net usage: 1650928) - (peak: 2013176)
SELECT item_id,url FROM cms_module_lisevideoer_item WHERE url != ''
Debug: (0.048336) - (net usage: 1748192) - (peak: 2110440)
End of Loading Modules
Debug: (0.05332) - (net usage: 1750120) - (peak: 2112368)
Initialize Smarty
Debug: (0.053334) - (net usage: 1750280) - (peak: 2112528)
Done Initialiing Smarty
Im also a bit confused with the timestamp in the log. Does this mean it was a lag before the "Initialize Smarty" or after?
Site running on private VPS with Ubuntu 16.04 (apache/2.4.18) and MySQL 5.7.18 and PHP 7.0.18-0ubuntu0.16.04.1
Any idea whats happening?