weather station and HTTP Refresh

Question about interruptions in a weather station program with interruptions for rain gauge and anemometer /

My program populates an IP address on my local network. Unfortunately, I lost some information about the rain gauge, I could not find the cause, but by increasing the refresh time, I realized that this problem came from the occupation of the processor and that even having these 2 in interrupts, it did not protect me from information loss while refreshing data over Ethernet.
Does anyone have any experience of this problem ????

Attached is the provocative piece of code these errors:

void writeResponse(EthernetClient& client, JsonObject& json) {
client.println("HTTP/1.1 200 OK");
client.println("Content-Type: application/json");
client.println("Connection: close");
client.println("Refresh: 5"); // rafraƮchit la page automatiquement toutes les 60 secondes
client.println();

json.prettyPrintTo(client);
}