how to debug feed graphing problems?

how does one debug feeds?

i have 50-some inputs. each is updated about every 60 seconds, with timestamped data.

two of these inputs are mapped to feeds with a 'log to feed' process and the feed name as the arg.  no other processing is applied.

each of the two feeds shows a correct value in the 'value' column and is updated as evidenced by the 'updated' column.  (i verified this by doing selects in the mysql database, and the database shows the same values as the gui)

the problem is when i select an individual feed then click on a graph link, i see no graph data for any of the 3 graphs (real-time, raw data, bar graph).  i have been uploading data for 4 or 5 days now, and there are data in the mysql database, but still nothing in the graphs.

the apache error log shows nothing.

how do i debug this?

server is debian 5 with apache 2.2.9-10, mysql 5.0.51a-24, php 5.2.6

client is firefox 8.0 on macosx 10.6.x

TrystanLea's picture

Re: how to debug feed graphing problems?

Maybe try calling the feed/data api directly such as:

The following will get all the feed data that is in the database so may be slow if there is a lot there:

http://localhost/emoncms3/feed/data.json&apikey=379d5e55d358ffdd4bcd1d76407f1bed&id=1&start=0&end=0&res=1

Try setting the res=1 to 100 or more if its really slow loading, it will then only try and fetch one evey hundred datapoints.

You can also set the start and end attributes to timestamps as required. 0 0 defaults all time

What is the post rate of your data?

powermeister's picture

Re: how to debug feed graphing problems?

the client samples the sensors every 10 seconds and caches data to a local database. then the client posts data to emoncms roughly every 60 seconds. so when the client posts, it will make 8 to 24 calls to post right in a row (each for a different set of inputs/sensors and timestamps)

powermeister's picture

Re: how to debug feed graphing problems?

the problem seems to have been database-related.  i dropped the database then created a new one, let the inputs start populating, then created the two feeds again.  now the graphs and graph data are showing up. it does take awhile before data show up - how many samples does a graph need before it plots anything?

previously not only were the graph data not showing up, the graphs were not drawn either.  only the zoom/pan buttons for the graphs were displayed.

it smells like urls are being saved in the database, and not in a way that is robust to changes to the apache/emoncms configuration.

i'll have a look at the php.  it would be nice if things would fail hard and fast rather than silently.  or at the very least generate a log file somewhere in which one could find warning/error messages that are not displayed in the ui. (apologies if these already exist and i'm just being thick)

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.