https://prefect.io logo
Title
m

Michael J Hall

10/09/2020, 7:22 PM
Hello. Is there a way to reduce the level of logging from 'DEBUG' to just periodically sending something out? I am getting complaints from my system admin that it is impacting other system operations on the server.
n

nicholas

10/09/2020, 7:26 PM
Hi @Michael J Hall - can you provide more context here? Which logs are you wanting to filter/reduce? The ones from the docker output?
m

Michael J Hall

10/09/2020, 8:50 PM
Yes, I think so. Also, does this have to run as root? I installed it that way, but now the system admin is asking if this can run outside of root as a service account with required privileges.
Here are some of the log messages: Oct 9 12:05:04 prdserv01 journal: {"severity": "DEBUG", "name": "prefect-server.ZombieKiller", "message": "Sleeping for 120.0 seconds..."}
Oct 9 12:06:23 prdserv01 journal: Sending telemetry to Prefect Technologies, Inc.: {"source":"prefect_server","type":"heartbeat","payload":{"id":"49157880-6651-4b03-ab62-275595196e49","prefect_server_version":"master","api_version":"0.2.0"}}
Oct 9 12:07:04 prdserv01 journal: {"severity": "DEBUG", "name": "prefect-server.ZombieKiller", "message": "Sleeping for 120.0 seconds..."}
Oct 9 12:07:53 prdserv01 journal: {"severity": "INFO", "name": "prefect-server.Scheduler", "message": "Scheduled 0 flow runs."}
Oct 9 12:07:53 prdserv01 journal: {"severity": "DEBUG", "name": "prefect-server.Scheduler", "message": "Sleeping for 300.0 seconds..."}
Oct 9 12:09:04 prdserv01 journal: {"severity": "DEBUG", "name": "prefect-server.ZombieKiller", "message": "Sleeping for 120.0 seconds..."}
Oct 9 12:11:04 prdserv01 journal: {"severity": "DEBUG", "name": "prefect-server.ZombieKiller", "message": "Sleeping for 120.0 seconds..."}
Oct 9 12:12:53 prdserv01 journal: {"severity": "INFO", "name": "prefect-server.Scheduler", "message": "Scheduled 0 flow runs."}
Oct 9 12:12:53 prdserv01 journal: {"severity": "DEBUG", "name": "prefect-server.Scheduler", "message": "Sleeping for 300.0 seconds..."}
Oct 9 12:13:04 prdserv01 journal: {"severity": "DEBUG", "name": "prefect-server.ZombieKiller", "message": "Sleeping for 120.0 seconds..."}
n

nicholas

10/09/2020, 8:52 PM
The only permissions
prefect server start
should need are the ability to access python from
PATH
and access to the docker daemon/docker compose
So anything outside that can be restricted afaik
Got it, thanks @Michael J Hall. Right now there isn't a way to batch logs or reduce the log level but that sounds like a nice improvement. Would you mind opening a ticket describing what you'd like to see? In the meantime you could try redirecting output using
nohup
, maybe sending it to a file to reduce the noise? Note that this file could become quite large.
m

Michael J Hall

10/09/2020, 9:01 PM
Will do. Is there a way to kill the Prefect processes on the server? I think it Prefect server may be competing for postgres connections with our SAS Viya services, thus causing difficulty from SAS services from restarting.
And some irate SAS users 😞
n

nicholas

10/09/2020, 9:03 PM
That's not good. I'm a little surprised they'd be competing though, Prefect Server's db runs in its own container
Or do you mean from specific tasks that are opening connections to your db?