Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

run on ubuntu14.04 , cpu 100% #14

Open
pinghe opened this issue Nov 19, 2015 · 5 comments
Open

run on ubuntu14.04 , cpu 100% #14

pinghe opened this issue Nov 19, 2015 · 5 comments

Comments

@pinghe
Copy link

pinghe commented Nov 19, 2015

step:

1: sudo apt-get install graphviz graphviz-dev libgv-ruby
2:

{{graphviz_link()
   digraph G {
      server1 -> server2;
   }
}}
@tckz
Copy link
Owner

tckz commented Nov 19, 2015

  1. How about log?

    e.g.)

    grep wiki_graphviz path/to/log/production.log
    

    Note: You should specify the log path/filename that matches your running environment. Perhaps production.log or development.log

  2. Could you try use dot command instead of libgv-ruby ?

    If gv(name of ruby lib) is not found in your redmine environment, the plugin executes dot command.

@pinghe
Copy link
Author

pinghe commented Nov 19, 2015

log:

[wiki_graphviz]not in cache: wiki_graphviz_plugin.7c37dc35f6c7ba77a7a647a15c7acf23aafeea7344b715c37913d0bb1fc6c53e
[wiki_graphviz]using Gv
[wiki_graphviz]child status: #<Process::Status: pid 26335 exit 5>
[wiki_graphviz]using dot

top command:
dot process continued occupation of CPU 99.9%

@tckz
Copy link
Owner

tckz commented Nov 20, 2015

In my environment(CentOS7.1 x64/ruby 2.2/graphviz 2.30.1/redmine 3.1.2),
It did not reproduce this issue which you reported.

Could you try to check graphviz(dot) behavior?

  1. Save the dot text to a file.

    digraph G {
    server1 -> server2;
    }
    
  2. Run dot command like below.

    $ /path/to/dot -Kdot -Tpng < /path/to/saved.dot > /path/to/out.png
    

    NOTE: Redirection must be used.

I think it seems to relate to the issue below.
http://www.graphviz.org/mantisbt/view.php?id=2543

@pinghe
Copy link
Author

pinghe commented Nov 21, 2015

graphviz(dot) behavior is correct.

Package: graphviz
Architecture: amd64
Version: 2.36.0-0ubuntu3

@pinghe
Copy link
Author

pinghe commented Jan 12, 2016

run on sudo is correct.

system("sudo dot -K#{layout} -T#{fmt[:type]} < \"#{temps[:dot].path}\" > \"#{temps[:img].path}\"  2>\"#{temps[:err].path}\"")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants