Open LaszloHont opened 7 years ago
I think that the problem is when the application being called from cron outputs a line that clears itself (like for an interactive shell, with ^L to clear the line). Then the output gets very long and minicron gets slow.
How much is a lot? You can check in the database how many lines of output it has. If you run the server in debug mode you can see what queries are being run also, that may give a clue what the problem is.
22 seconds to render in the web interface less than a second to select in sqlite3
sqlite> select count(*) from job_execution_outputs where execution_id=19;
45971
This was almost the samec cron job with the --verbose flag removed. With the flag still on it would have been more than ten times as much output.
Can you run the server with the --debug
and --verbose
flag and see what it outputs? You should be able to see the execution times for all the queries which will hopefully point to the issue.
The easy fix for this issue is for minicron to run the cron commands (or users be told to run the cron commands...) with a TERM setting that does not clear anything. Perhaps TERM=dumb
The UI should be able to handle a job with any amount of output. I think there are two fixes here:
e.g. loading 127.0.0.1:9292/execution/15 takes more than a minute with ruby using 100% cpu