Strange issues with XML / RSS Feeds

Discussion in 'Server Operation' started by bzzik, Nov 2, 2010.

  1. bzzik

    bzzik New Member

    Good day to all.

    Some days ago I have upgrade my server and installed Centos 5.5 x64 using this tutorial (before that I was using Slackware i386, PHP 5.2.6). Also I updated PHP to latest 5.3.3.

    But I faced strange issue with XML / RSS Feeds (may be it is not related to XML directly, but it is one of the discovered issues) on my sites. XML requests are working very slow and any of RSS feeds are not working now. I thought that it is PHP issue and downgraded to 5.2.14. But the problem still exists :eek: I was trying to change Apache config, also changed php.ini, but nothing helps :confused: On previous server installation everything worked fine...

    Update: downgrading to PHP 5.2.6 also did not help.

    Here is my current PHP info.
    Here is the site where xml queries working very slow (notice server data queries).

    Any advice will be helpful.

    Thank you.
     
    Last edited: Nov 3, 2010
  2. falko

    falko Super Moderator Howtoforge Staff

    Any errors in Apache's error log? What about your server load?
     
  3. bzzik

    bzzik New Member

    Thanks for your answer falko.

    That is the problem, that there is no errors in logs. The server is not overloaded. It has 4CPUs, 4 GB RAM and we are running a couple of sites only at the moment. If you want I can provide you an ftp access to Apache logs easily.

    Just for compare:
    Here is the site2 on server2 where everything works smooth. Here is PHP info of that server.
    Here is the same site1 on server1 where the queries are long.

    This two servers have same Apache 2.2.3 version, same PHP 5.2.6 version. But on server1 PHP is build from RPM packages and on server2 PHP is compiled manually.

    I cannot exactly diagnose the problem, but my thoughts are that it is XML related. May be I should remove all rpm xml packages and compile them manually?
     
    Last edited: Nov 4, 2010
  4. falko

    falko Super Moderator Howtoforge Staff

    Have you tried to debug your PHP script to find out what happens after each command?
     
  5. bzzik

    bzzik New Member

    Nope, cause it is not my script :( But I will try...
     
  6. bzzik

    bzzik New Member

    So, after debugging one of the scripts, I found out that the problem is in cURL. Name lookup is slow in it. Sometimes it took less that 1 second to lookup, but sometimes up to 10 seconds. If I try to lookup local server, it is always less than 1 second. If it is lookup of ours other web server (which is in LAN) - sometimes less than 1 second and sometimes up to 5 seconds.

    Here are curl_getinfo() dumps

    Local server
    Second web server in LAN
    Remote host
    So may be the problem not in cURL, but I have an incorrect server configuration. Some problem in resolving? I checked resolv.conf and there are correct nameservers. I compared setting with second web server and they are seems to be fine.

    P.S.
    Please note, that everything is fine on my second web server. Such problem is only on this server.


    Update:
    The problem is solved. In resolv.conf were incorrect nameservers (from another ISP). Changed them and after sometime everything started to working fine. Hope, this helped.
     
    Last edited: Nov 8, 2010

Share This Page