Ad Widget

Collapse

Template import/delete operation fails - blank screen

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Linwood
    Senior Member
    • Dec 2013
    • 398

    #1

    Template import/delete operation fails - blank screen

    I suspect I'm missing a timeout somewhere.

    I have a medium sized setup running 3.0.2rc on ubuntu 15.40. I screwed up a template, but had a copy of the template exported and tried to import.

    Blank screen.

    Tried to delete/clear first - blank screen after a couple minutes (not precisely 2 minutes, maybe a bit less).

    Stopped zabbix server to see if it was either a blocking issue, or load issue.

    Tried deleting a bunch one by one from the host, worked fine, tried again to do a delete-clear - failed with blank screen.

    Kept doing that until I could get a delete-clear to work, then re-did the import and it imported fine.

    So... what it's not:

    It's not an error in the import template nor lack of xml support or anything like that, because it worked before and after.

    It's not any interaction with zabbix-server because it wasn't running.

    I have checked logs:

    - /var/log/apache2/error and /access - no entries other than the "200" for hitting the page.
    - /var/log/syslog - nothing
    - /var/log/postgresql/postgressql-9.4-main.log - nothing new, errors normally shown ehre.

    I've got the following timeouts set:

    /etc/php5/apache2/php.ini:
    max_execution_time = 900
    max_input_time = 900

    /etc/apache2/apache2.conf
    Timeout 900

    What I didn't set in the above was default_socket_timeout, it is set at 60 (I see as I write this) but I didn't think it would impact this, maybe it was?

    Incidentally the log level on Apache2 is set to "debug" and normally gives me a lot of clues, but it gave absolutely nothing for this failure, whatever failure it was (the last entry is a 200 for access of the page via POST).

    What makes this a bit more interesting is I fixed the template as above, then just for grins with the zabbix server running, I tried importing the (exact same) template again.

    It's still running -- maybe 500 seconds into it. The others failed much sooner. So maybe it's some other error not timeout.

    But nothing is showing in any log I can think of.

    Anyone have any idea what can make a template import, or template delete, just give a blank screen without any errors in any logs?

    Or conversely, what log may I not be thinking of to look in?

    This rerun is still running and I have to leave for the afternoon, so thought I would post this for anyone's ideas while out. Even if it works this time (the template is absolutely identical this time, same file), I'm not sure what I learned, other than that long running operations will run a long time.
  • kloczek
    Senior Member
    • Jun 2006
    • 1771

    #2
    Look into httpd error logs and probably you will find that it as OOM in php.
    Just increase memory used by php.
    http://uk.linkedin.com/pub/tomasz-k%...zko/6/940/430/
    https://kloczek.wordpress.com/
    zapish - Zabbix API SHell binding https://github.com/kloczek/zapish
    My zabbix templates https://github.com/kloczek/zabbix-templates

    Comment

    • Linwood
      Senior Member
      • Dec 2013
      • 398

      #3
      Well, now I'm really confused.

      I was about to write back that I mentioned the logs above I searched, and no indication of a memory error.

      And I did. Really.

      But when I searched this morning there it is -- it ran out of memory at about 805MB (I have 796M as the limit).

      I'm baffled why I didn't find it yesterday, I was actually running the program with a tail -f running, not a search after the fact. Makes me wonder if there is some delay in php writing its log?

      Anyway, I'm at 800M already, which seems excessive. That was just importing (and updating) a template used on maybe 80 or so windows servers. Or conversely trying to do a delete/clear on the same template.

      Especially for the delete-clear, that seems rather excessive; is that a sign there's a memory leak in here, or is zabbix trying to cache the whole thing in variables in the apache program?

      Comment

      • kloczek
        Senior Member
        • Jun 2006
        • 1771

        #4
        Originally posted by Linwood
        But when I searched this morning there it is -- it ran out of memory at about 805MB (I have 796M as the limit).
        It is know "feature" that delete hosts is quite memory consuming operation.
        I remember that last time when I've been trying to delete 30 hosts each one with about 200 items it was necessary to increase php memory to more than 1GB.

        Solution/workaround. on any massive delete operations use zabbix API and delete hosts one by one.
        http://uk.linkedin.com/pub/tomasz-k%...zko/6/940/430/
        https://kloczek.wordpress.com/
        zapish - Zabbix API SHell binding https://github.com/kloczek/zapish
        My zabbix templates https://github.com/kloczek/zabbix-templates

        Comment

        Working...