Skip to content
This repository has been archived by the owner on May 17, 2021. It is now read-only.

Execution UI slow with lots of output #287

Open
LaszloHont opened this issue Jun 15, 2017 · 7 comments
Open

Execution UI slow with lots of output #287

LaszloHont opened this issue Jun 15, 2017 · 7 comments

Comments

@LaszloHont
Copy link
Contributor

e.g. loading 127.0.0.1:9292/execution/15 takes more than a minute with ruby using 100% cpu

@LaszloHont
Copy link
Contributor Author

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.

@jamesrwhite
Copy link
Owner

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.

@LaszloHont
Copy link
Contributor Author

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

@LaszloHont
Copy link
Contributor Author

LaszloHont commented Jun 16, 2017

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.

@jamesrwhite
Copy link
Owner

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.

@LaszloHont
Copy link
Contributor Author

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

@jamesrwhite
Copy link
Owner

The UI should be able to handle a job with any amount of output. I think there are two fixes here:

  • Put a sensible limit on how much output the UI requests and then it can load more as you scroll down the page.
  • Some kind of fix for terminal clearing like you describe or the client could be smarter in how it handles it perhaps.

@jamesrwhite jamesrwhite added this to the future milestone Jul 2, 2017
@jamesrwhite jamesrwhite changed the title Minicron execution viewer is very slow when the cron job contains a lot of output Execution UI slow with lots of output Jul 2, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants