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

Weathermap full size view blank sometime #255

Open
darasom1 opened this issue Jan 15, 2021 · 7 comments
Open

Weathermap full size view blank sometime #255

darasom1 opened this issue Jan 15, 2021 · 7 comments

Comments

@darasom1
Copy link

Hi All,

Our weathermap now becoming weird on full size map view sometime we can see full view sometime it was blank.
image

  • Weathermap 0.98
  • OS : CentOS 7
  • PHP : 5.4.16
  • Cacti : 0.8.8h
  • When we run # time ./weathermap --no-data --config configs/Network.conf --output temp.png
Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/share/pear/Console/Getopt.php on line 109

Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/share/pear/Console/Getopt.php on line 154

Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/share/pear/Console/Getopt.php on line 154

Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/share/pear/Console/Getopt.php on line 154
libpng warning: Interlace handling should be turned on when using png_read_image

real    0m1.239s
user    0m1.165s
sys     0m0.072s
```
@howardjones
Copy link
Owner

I don't think those warnings would cause a blank map. Are you sure you aren't just loading the web page while the image is being written? (e.g. does pressing reload in the browser fix it?)

@darasom1
Copy link
Author

Hi @howardjones ,

Yes It happened randomly. Sometime reload browser several time and even clear all cache but full view still not working at all.
After sometime like a after few minute later I try refresh it several times again than I can see full view again.
Before there're some errors related to php max_excecute time but after I increase it to 300s the error gone. I try to debug all, apache error log, cacti error log but there's no trace at all.

The only error I can fine is the above Strict Standards: Non-static method PEAR::isError().

Or because of width too big ?

BACKGROUND images/blueboard2880x1620.jpg
WIDTH 2880
HEIGHT 1620
HTMLSTYLE overlib
KEYFONT 100
TITLE Smart Backbone Monitor V8
TIMEPOS 56 1603 Created: %b %d %Y %H:%M:%S

@howardjones
Copy link
Owner

It's not the PEAR thing. That's just a warning to do with the command line tool.

So how are you normally generating your map? cron? Cacti poller?

It would be good to look at the output png file when you get a blank, and see if the file is zero length or only just written. (so is it a bad file, or half-written, or something like that)

That is a big map, but it shouldn't cause a problem as long as memory_limit is high enough. The PHP png-writing code is not very fast, but only a few seconds for a large image, not 5 minutes! :-)

@darasom1
Copy link
Author

We use Cacti poller to generate image.
When it was blank I check output file zero length to html file.
image

@howardjones
Copy link
Owner

Oh, that's interesting. So it is producing the image file. This is a new one! :-) (things you don't want to hear a doctor say)

Do you get any error in the cacti poller log?

@darasom1
Copy link
Author

Cannot find any error beside this

PHP Fatal error: Maximum execution time of 59 seconds exceeded in /var/www/cacti/plugins/weathermap/lib/HTML_ImageMap.class.php on line 321

@howardjones
Copy link
Owner

OK, well that will do it. PHP just stopped halfway through writing out the HTML file.

So I guess you are using one-minute polling in Cacti. Cacti sets the max-runtime to match the poller time, so it can't accidentally run multiple pollers. Weathermap has to finish inside that one minute too.

This is mainly a Cacti performance issue - if you must have 1 minute polling, you might need to tune your system better. SSDs, Boost, newer Cacti, newer PHP, Weathermap rrd_use_poller_output should all help. (php 7 can be up to 2x faster than php 5 - but check which Cacti versions work with it. Also for Cacti 1.x you probably want phalek's fork of Weathermap.) There is a good FAQ for Cacti performance tuning on the Cacti Forums.

The quickest to try though is add SET rrd_use_poller_output 1 to the top of your weathermap map file, and wait a few minutes. Weathermap should start to collect data directly from the poller, which should be quicker. Check the STATS lines in the logs before and after to see if it is helping with run time.

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