LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 11-02-2010, 03:13 AM   #1
bzzik
LQ Newbie
 
Registered: Jan 2009
Location: Latvia, Riga
Distribution: CentOS
Posts: 25

Rep: Reputation: 0
Unhappy Strange issues with XML / RSS Feeds on Centos 5.5


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 I was trying to change Apache config, also changed php.ini, but nothing helps 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 by bzzik; 11-03-2010 at 04:00 AM.
 
Old 11-08-2010, 03:22 AM   #2
bzzik
LQ Newbie
 
Registered: Jan 2009
Location: Latvia, Riga
Distribution: CentOS
Posts: 25

Original Poster
Rep: Reputation: 0
So, after debugging one of the PHP 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
Quote:
array(20) { ["url"]=> string(19) "http://s1.contra.lv" ["content_type"]=> string(24) "text/html; charset=utf-8" ["http_code"]=> int(200) ["header_size"]=> int(761) ["request_size"]=> int(51) ["filetime"]=> int(-1) ["ssl_verify_result"]=> int(0) ["redirect_count"]=> int(0) ["total_time"]=> float(0.59913) ["namelookup_time"]=> float(2.5E-5) ["connect_time"]=> float(7.6E-5) ["pretransfer_time"]=> float(7.8E-5) ["size_upload"]=> float(0) ["size_download"]=> float(104746) ["speed_download"]=> float(174830) ["speed_upload"]=> float(0) ["download_content_length"]=> float(-1) ["upload_content_length"]=> float(0) ["starttransfer_time"]=> float(0.583356) ["redirect_time"]=> float(0) }

Took 0.59913 seconds to send a request to http://s1.contra.lv
Second web server in LAN
Quote:
array(20) { ["url"]=> string(19) "http://s2.contra.lv" ["content_type"]=> string(24) "text/html; charset=UTF-8" ["http_code"]=> int(200) ["header_size"]=> int(265) ["request_size"]=> int(51) ["filetime"]=> int(-1) ["ssl_verify_result"]=> int(0) ["redirect_count"]=> int(0) ["total_time"]=> float(5.002668) ["namelookup_time"]=> float(5.001231) ["connect_time"]=> float(5.001649) ["pretransfer_time"]=> float(5.001652) ["size_upload"]=> float(0) ["size_download"]=> float(1207) ["speed_download"]=> float(241) ["speed_upload"]=> float(0) ["download_content_length"]=> float(1207) ["upload_content_length"]=> float(0) ["starttransfer_time"]=> float(5.002648) ["redirect_time"]=> float(0) }

Took 5.002668 seconds to send a request to http://s2.contra.lv
Quote:
array(20) { ["url"]=> string(19) "http://s2.contra.lv" ["content_type"]=> string(24) "text/html; charset=UTF-8" ["http_code"]=> int(200) ["header_size"]=> int(265) ["request_size"]=> int(51) ["filetime"]=> int(-1) ["ssl_verify_result"]=> int(0) ["redirect_count"]=> int(0) ["total_time"]=> float(0.003021) ["namelookup_time"]=> float(0.001471) ["connect_time"]=> float(0.001959) ["pretransfer_time"]=> float(0.001961) ["size_upload"]=> float(0) ["size_download"]=> float(1207) ["speed_download"]=> float(399536) ["speed_upload"]=> float(0) ["download_content_length"]=> float(1207) ["upload_content_length"]=> float(0) ["starttransfer_time"]=> float(0.003006) ["redirect_time"]=> float(0) }

Took 0.003021 seconds to send a request to http://s2.contra.lv
Remote host
Quote:
array(20) { ["url"]=> string(42) "http://feeds.joomla.org/JoomlaSecurityNews" ["content_type"]=> string(23) "text/xml; charset=UTF-8" ["http_code"]=> int(200) ["header_size"]=> int(358) ["request_size"]=> int(73) ["filetime"]=> int(-1) ["ssl_verify_result"]=> int(0) ["redirect_count"]=> int(0) ["total_time"]=> float(0.270293) ["namelookup_time"]=> float(0.002906) ["connect_time"]=> float(0.061371) ["pretransfer_time"]=> float(0.061374) ["size_upload"]=> float(0) ["size_download"]=> float(21219) ["speed_download"]=> float(78503) ["speed_upload"]=> float(0) ["download_content_length"]=> float(-1) ["upload_content_length"]=> float(0) ["starttransfer_time"]=> float(0.149823) ["redirect_time"]=> float(0) }

Took 0.270293 seconds to send a request to http://feeds.joomla.org/JoomlaSecurityNews
Quote:
array(20) { ["url"]=> string(42) "http://feeds.joomla.org/JoomlaSecurityNews" ["content_type"]=> string(23) "text/xml; charset=UTF-8" ["http_code"]=> int(200) ["header_size"]=> int(358) ["request_size"]=> int(73) ["filetime"]=> int(-1) ["ssl_verify_result"]=> int(0) ["redirect_count"]=> int(0) ["total_time"]=> float(10.272009) ["namelookup_time"]=> float(10.003368) ["connect_time"]=> float(10.057596) ["pretransfer_time"]=> float(10.0576) ["size_upload"]=> float(0) ["size_download"]=> float(21219) ["speed_download"]=> float(2065) ["speed_upload"]=> float(0) ["download_content_length"]=> float(-1) ["upload_content_length"]=> float(0) ["starttransfer_time"]=> float(10.160526) ["redirect_time"]=> float(0) }

Took 10.272009 seconds to send a request to http://feeds.joomla.org/JoomlaSecurityNews
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 by bzzik; 11-08-2010 at 02:16 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
RSS Feeds custangro LQ Suggestions & Feedback 2 10-08-2008 02:08 PM
RSS feeds ..?? logicalfuzz LQ Suggestions & Feedback 4 11-02-2005 07:13 PM
RSS Feeds (HELP) webwolf70 Programming 1 02-07-2005 09:08 AM
Rss Feeds essoft478 Programming 1 12-19-2004 12:13 AM
RSS/XML Live Bookmarks / News Feeds win32sux Programming 3 10-24-2004 02:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 07:11 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration