lists.netmrg.net lists.netmrg.net
NetMRG discussion and support
 
FAQ :: Search :: Memberlist :: Usergroups :: Register
Profile :: Log in to check your private messages :: Log in

Template Graphs: cannot add graph item
Goto page 1, 2  Next
 
Post new topic   Reply to topic    lists.netmrg.net Forum Index -> Support
Author Message
A7V
Contributor


Joined: 18 Jun 2004
Posts: 53
Location: Lisbon, Portugal

PostPosted: Fri Mar 04, 2005 3:11 pm    Post subject: Template Graphs: cannot add graph item Reply with quote

I was creating a new template graph and when adding a new graph item I can only see until the Monitor: dropdown box with 2 items:
- "-Fixed Value-"
- "-Sum of all graph items-"

From there on no more lines, even the Save Changes button Sad
This happened after migrating to a new machine, and I confirmed it works on the old one. Taking this into account where can I look for DB inconsistencies?

Note: I enabled dbdebug and I get no error messages.
Back to top
silfreed
Site Admin


Joined: 19 Jan 2003
Posts: 394
Location: Shippensburg, PA, USA

PostPosted: Fri Mar 04, 2005 3:51 pm    Post subject: Reply with quote

You didn't upgrade to PHP 5, did you?
This actually sounds like the PHP script is dying instead of a mysql corruption. You might want to turn set the following in config.php:
Code:
error_reporting(E_ALL);
ini_set("display_errors", true);

and let us know what is going on.

-Doug
Back to top
A7V
Contributor


Joined: 18 Jun 2004
Posts: 53
Location: Lisbon, Portugal

PostPosted: Fri Mar 04, 2005 4:16 pm    Post subject: Reply with quote

I get this:
Code:

Notice: Undefined variable: PERMIT in /usr/local/var/www/netmrg/webfiles/graph_items.php on line 287
Back to top
silfreed
Site Admin


Joined: 19 Jan 2003
Posts: 394
Location: Shippensburg, PA, USA

PostPosted: Fri Mar 04, 2005 4:25 pm    Post subject: Reply with quote

Just above line 287 in graph_items.php, add a line:
Code:
global $PERMIT;

and see if it helps. I don't really think this is our error, but..

-Doug
Back to top
A7V
Contributor


Joined: 18 Jun 2004
Posts: 53
Location: Lisbon, Portugal

PostPosted: Fri Mar 04, 2005 4:33 pm    Post subject: Reply with quote

The warning disappears, the problem remains.

For the record:

Old machine, no problems:
Code:

PHP 4.3.5 (cli) (built: May 20 2004 12:51:15)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies


New machine, with problem:
Code:

PHP 4.3.2 (cgi), Copyright (c) 1997-2003 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2003 Zend Technologies
Back to top
silfreed
Site Admin


Joined: 19 Jan 2003
Posts: 394
Location: Shippensburg, PA, USA

PostPosted: Fri Mar 04, 2005 5:05 pm    Post subject: Reply with quote

Code:
ANALYZE TABLE monitors;
?

-Doug
Back to top
A7V
Contributor


Joined: 18 Jun 2004
Posts: 53
Location: Lisbon, Portugal

PostPosted: Fri Mar 04, 2005 5:08 pm    Post subject: Reply with quote

Code:

mysql> ANALYZE TABLE monitors;
+-----------------+---------+----------+----------+
| Table           | Op      | Msg_type | Msg_text |
+-----------------+---------+----------+----------+
| netmrg.monitors | analyze | status   | OK       |
+-----------------+---------+----------+----------+
1 row in set (0.14 sec)
Back to top
silfreed
Site Admin


Joined: 19 Jan 2003
Posts: 394
Location: Shippensburg, PA, USA

PostPosted: Fri Mar 04, 2005 5:20 pm    Post subject: Reply with quote

Code:
ANALYZE TABLE sub_devices;
ANALYZE TABLE devices;


I know you have a huge list of monitors (from other threads) - does this page take a looooong time to display, and then it stops with only those two items?
I think the query that builds this might just be taking too much time.

-Doug
Back to top
A7V
Contributor


Joined: 18 Jun 2004
Posts: 53
Location: Lisbon, Portugal

PostPosted: Fri Mar 04, 2005 5:26 pm    Post subject: Reply with quote

silfreed wrote:
Code:
ANALYZE TABLE sub_devices;
ANALYZE TABLE devices;


I know you have a huge list of monitors (from other threads) - does this page take a looooong time to display, and then it stops with only those two items?

I think the query that builds this might just be taking too much time.

-Doug


Yes, I do, 24972 actually Cool and no, it's pretty fast to display the page.
Taking into account that this started to happen only after I moved the database what must I check and compare to see any cause for this to happen?

PS: I added you to AIM.
Back to top
silfreed
Site Admin


Joined: 19 Jan 2003
Posts: 394
Location: Shippensburg, PA, USA

PostPosted: Fri Mar 04, 2005 5:30 pm    Post subject: Reply with quote

A7V wrote:
Yes, I do, 24972 actually 8) and no, it's pretty fast to display the page.
Taking into account that this started to happen only after I moved the database what must I check and compare to see any cause for this to happen?


Not sure; you do have quite an odd situation there. There shouldn't really be any problems moving the RRDs or the database as long as the config file is updated. Let me think about it over lunch...

A7V wrote:
PS: I added you to AIM.


Hmm.. I forgot I entered that (not that it was that difficult to guess). Unfortunately my work blocks AIM. Wouldn't happen to have Jabber, would you?

-Doug
Back to top
A7V
Contributor


Joined: 18 Jun 2004
Posts: 53
Location: Lisbon, Portugal

PostPosted: Fri Mar 04, 2005 5:35 pm    Post subject: Reply with quote

silfreed wrote:
Let me think about it over lunch...

Lunch? I'm going for a snack before dinner Wink

silfreed wrote:

A7V wrote:
PS: I added you to AIM.


Hmm.. I forgot I entered that (not that it was that difficult to guess). Unfortunately my work blocks AIM. Wouldn't happen to have Jabber, would you?

-Doug

I tried AIM as it's what you have in your profile.
I'm using Trillian and I can have Jabber if I configure an account.
I also have MSN and ICQ
Back to top
A7V
Contributor


Joined: 18 Jun 2004
Posts: 53
Location: Lisbon, Portugal

PostPosted: Thu Mar 17, 2005 5:37 pm    Post subject: Reply with quote

As talked I configured the old machine to point to the new DB and go figure it works Shocked
I can only say the problem is not on the DB but somewhere in Apache, PHP or something Crying or Very sad
I'm using CentOS 3 x86_64. If anyone has a setup somewhat similar and has no problems I need to compare rpm versions.
Anyway, I welcome any ideas.
Back to top
A7V
Contributor


Joined: 18 Jun 2004
Posts: 53
Location: Lisbon, Portugal

PostPosted: Wed May 04, 2005 3:53 pm    Post subject: Reply with quote

I was doing some upgrades with yum to try solve this issue with no luck.
I (don't ask why) looked at the page source and saw this:
Code:
<b>Monitor:</b><br />
   <select name="mon_id" >
      <option value="-1" SELECTED>-Fixed Value-</option>
      <option value="-2">-Sum of all graph items-</option>
<br />
<b>Fatal error</b>:  Allowed memory size of 9437240 bytes exhausted (tried to allocate 71 bytes) in <b>/usr/local/var/www/netmrg/lib/database.php</b> on line <b>71</b><br />


1st: What setting needs to be changed to allow more memory to be allocated?
2nd: Why is this on the html code and not displayed by the browser? Being able to see this before would have been very time saving Crying or Very sad
Back to top
A7V
Contributor


Joined: 18 Jun 2004
Posts: 53
Location: Lisbon, Portugal

PostPosted: Wed May 04, 2005 4:06 pm    Post subject: Reply with quote

1st: What setting needs to be changed to allow more memory to be allocated?

Answer: Editing memory_limit = 8M in php.ini to 16M resolved the issue
Very Happy
Back to top
silfreed
Site Admin


Joined: 19 Jan 2003
Posts: 394
Location: Shippensburg, PA, USA

PostPosted: Wed May 04, 2005 4:15 pm    Post subject: Reply with quote

A7V wrote:
2nd: Why is this on the html code and not displayed by the browser? Being able to see this before would have been very time saving :cry:


Well, it was displayed in the HTML, but was caught in an <option /> tag so it wasn't displayed properly. Evil, evil.

What we really need to do is figure out why you need more than 8 megs to display that option dialog, and I suspect it's going to be because we pull all the mysql results into an array and then make the HTML. I don't think that's going to come up with an easy fix.

-Doug
Back to top
Display posts from previous:   
Post new topic   Reply to topic    lists.netmrg.net Forum Index -> Support All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 



smartBlue Style © 2002 Smartor
Powered by phpBB © 2001, 2002 phpBB Group