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

Creating graphs Host dubled #92

Closed
interduo opened this issue Dec 24, 2016 · 7 comments
Closed

Creating graphs Host dubled #92

interduo opened this issue Dec 24, 2016 · 7 comments

Comments

@interduo
Copy link
Contributor

interduo commented Dec 24, 2016

When You are creating graphs for hosts and click create

  • the server is hanging (mysql 100% CPU)
  • you don't know if You clicked successfully create from GUI
  • If You click create one more time the graphs are doubled/trippled if You click that button more

That behavior is wrong. You sholuldn't be able to do doubled graphs in that way. There is no lock for that.

@interduo
Copy link
Contributor Author

interduo commented Dec 24, 2016

Apparently there are errors in log:
2016-12-24 13:28:39 - ERROR PHP NOTICE: Undefined index: index_type in file: /var/www/html/cacti/lib/template.php on line: 1186
2016-12-24 13:28:39 - CMDPHP PHP ERROR NOTICE Backtrace: (/graphs_new.php: 37 form_save)(/graphs_new.php: 114 host_new_graphs_save)(/graphs_new.php: 241 create_complete_graph_from_template)(/lib/template.php: 1180 CactiErrorHandler)(/lib/functions.php: 4172 cacti_debug_backtrace)
2016-12-24 13:28:39 - ERROR PHP NOTICE: Uninitialized string offset: 0 in file: /var/www/html/cacti/lib/template.php on line: 1180
2016-12-24 13:28:39 - CMDPHP PHP ERROR WARNING Backtrace: (/graphs_new.php: 37 form_save)(/graphs_new.php: 114 host_new_graphs_save)(/graphs_new.php: 241 create_complete_graph_from_template)(/lib/template.php: 1180 CactiErrorHandler)(/lib/functions.php: 4167 cacti_debug_backtrace)

2016-12-24 13:28:39 - ERROR PHP NOTICE: Uninitialized string offset: 0 in file: /var/www/html/cacti/lib/template.php on line: 1304
2016-12-24 13:28:39 - CMDPHP PHP ERROR WARNING Backtrace: (/graphs_new.php: 37 form_save)(/graphs_new.php: 114 host_new_graphs_save)(/graphs_new.php: 241 create_complete_graph_from_template)(/lib/template.php: 1304 CactiErrorHandler)(/lib/functions.php: 4167 cacti_debug_backtrace)

@cigamit
Copy link
Member

cigamit commented Dec 27, 2016

We should understand why mysql is in a race condition. I'll keep this open, but please spend some time looking into mysql's "show processlist" command when it's in this race condition. Then, report the queries. You can also enable the slow query log and make the query time something like 2 seconds. Let us know the slow queries.

@interduo
Copy link
Contributor Author

interduo commented Dec 27, 2016

I think That the button could disappear after first click and It would resolve the source of problem.
OK - I will log and show You slow querries.

@cigamit
Copy link
Member

cigamit commented Dec 28, 2016

Anything?

cigamit added a commit that referenced this issue Dec 28, 2016
@cigamit
Copy link
Member

cigamit commented Dec 28, 2016

Resolved.

@cigamit cigamit closed this as completed Dec 28, 2016
@interduo
Copy link
Contributor Author

This works. Thank You.

@interduo
Copy link
Contributor Author

interduo commented Jan 5, 2017

It doesn't work in all cases today I've added hosts and twice time It added doubled.
Maybe when adding hosts there could be a lock whitch could prevent adding host doubled?

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

No branches or pull requests

2 participants