I’m running a PHP application, and I’ve noticed that when a suspended machine wakes in response to an HTTP request, any errors logged to /dev/stderr via error_log(), fwrite(), or syslog() don’t appear in Fly’s logging system or Grafana. In fact another error appears:
[info]ERROR stderr to vsock zero copy err: Socket not connected (os error 107)
It seems like the machine is able to serve requests before it fully reconnects to the logging system, causing logs from the first few seconds after waking to be lost.
I’m considering workarounds and wondering:
-
Is there a way to determine how recently a machine was resumed from suspension? This could help delay logging until it’s fully connected.
-
Is there an alternative logging endpoint I could send errors to instead of relying on /dev/stderr?
Has anyone else encountered this issue or found a good way to ensure logs aren’t lost when a machine wakes? I realize this could also be PHP-specific.
Thanks!