Website switching between 200ms and 8.2s loading time

At one of my hosting servers, I've a website that has a strange performance problem. Sometimes the server needs 8.2s to load the webpage, other times it's 200ms. It's almost never different/in between.

I've set up a monitoring script (Zabbix web) at 5 "comparable" websites on the same server and ran it for a few days. The graph shows me that there's only one virtual host that has this problem. Also a empty php script (or just a static file) experiences the same problem, so based on that I guess it isn't php related (even though I tested with different php versions but they all have this problem). Other vhosts don't have that same problem, they're always between a few ms and a few hundred, but that's "normal".

I compared the Apache-config: there's no difference between this and other websites.

I rebooted the server, restarted Apache, but the problem never disappears. I don't know where to look for anymore because based on my findings I guess it should be some specific config for this website, but I can't think of a place to look for.

Ubuntu 16.04 / Apache 2.4.18

This website doesn't have that many visitors (just a regular amount) and because of my Zabbix the website has two (single file) visits every minute.

Closed (fixed)


The .tld different.

NS dns lookups?

A extra service as cloudflare before and so on only thinking loud.

Status: Active ยป Postponed

Jfro: I just updated the issue when I tried to add more relevant information and I saw an dns-related issue (two A-records directing to different ip-adresses for the same domain name). You suggested to look at the same, so I guess we must be right, I'm waiting for my customer to solve this (of course, I can check using /etc/hosts but to be sure it's better to wait for the real dns change)

Ok thanks for update. Please post solution and cause here also if found? ( handig voor anderen die zoeken)

Cause was indeed a double A-record in the DNS. This caused a kind of load balancing between our server and another (external) server. The external server didn't respond (I guess the IP didn't exist or something like that) en that caused a 8 second 'timeout'.

So, in case some-one experiences a 8 second timeout, please check your DNS settings.