[dev] SOLVED: performance problems with horde

Sebastian Birnbach birnbacs at gmail.com
Sun Jun 14 19:57:15 UTC 2015


All,

thanks again for bearing with me. I finally (!!) solved my performance
problems and they were - surprise! - related to DNS.

In resolv.conf I had defined a secondary nameserver that now turned out not
to respond at all. For some reason it got queried every time Horde
processed a HTTP request. I have no clue
* why the secondary DNS was called at all
* why the secondary DNS was queried before the primary and
* why this didn't affect other PHP applications like phpMyAdmin.
Af any of you dev guys wants to know more I am ready to perform any test
you like.


I also noticed that pear application DNS2 throws errors like this on every
request:

Jun 14 21:35:00 max HORDE: PHP ERROR: Undefined offset: 1 [pid 6887 on line
416 of "/usr/local/share/pear/Net/DNS2.php"]

I experimentally put some debugging code two lines above the referenced
statement to dump $line and this it what it yields:

Jun 14 21:41:51 max HORDE: line is [removed name of domain in this example]
Jun 14 21:44:55 max HORDE: line is nameserver 192.168.0.10
Jun 14 21:44:55 max HORDE: line is options:timeout:1
Jun 14 21:44:55 max HORDE: PHP ERROR: Undefined offset: 1 [pid 6934 on line
418 of "/usr/local/share/pear/Net/DNS2.php"]

It seems like the timeout options for a DNS query doesn't get processed
properly. The default timeout seems to be 5 seconds, which makes the
picture complete:

+ HTTP request coming in
+ DNS lookup is done on secondary DNS
+ processing of timeout = 1 second fails so that timeout = 5 seconds
+ after 5 seconds the primary DNS is queried
+ processing continues with good speed.


Well, well, well, this little problem kept me way too long but finally I
mastered it. Feel free to comment (or congratulate :)

  Sebastian


More information about the dev mailing list