Logs showing up later than expected in the app

Hello I am currently running a discord bot on fly where every 5 minutes some form of logging is being sent to the instance. Within those logs have the current time being shown which is needed for me to track when I am debugging

However in fly logs or in the monitoring tab I inconsistently get the logs shown or it is arrived in massive batches in a delayed fashion.

From what I see, logs are coming thru every 10-15mins in massives batches. When they do come it is delayed where the supposed current time in the logs is not actually what the current time is on the instance.

An example: The logs would return saying current time is β€œ14:11” but the time when that log was sent was β€œ14:16” instead. I am confident at β€œ14:11” the log was actually done at that time but fly sends it to me late

I been trying to go thru the docs about logging and I am wondering

  • Are logs only shown in the CLI or the UI at certain time interval (every 10mins or so)?
  • Is there a way or an option to have logging actually log when actions happen? Or is it an expected thing where logs are only shown every X minutes

I am using the free tier applications so maybe there is some extra logging configurations I do not get since I am not paying

Any help is appreciated thanks!

1 Like

Hi @doingitnow

Internally we use NATS for logs.

What happened is that the logs cluster might have been clogged and sent batches at those moments you were looking at. Definitely not great but we are looking into improving that, it’s not an issue on your end at all.

1 Like

Hello

Thats good to know. Would you know when there would be improvements into shipping logs more frequently? Logs are pretty important for debugging when you need it and having it batched and delayed is not great when you really need it fast

1 Like

Noticed that fly apps restart [APP] brings up the logs I was waiting for. Weird. But it’s a workaround for me.