Tag Archives: strace

WordPress not resolving hosts – strace magical cure

It's been a week for my WordPress being unable to resolve some external host services via URL address. It was working for a while, couple of months, with no changes by my side, and suddenly the dashboard RSS and stats data stopped responding. The error was: 

RSS Error: WP HTTP Error: Couldn't resolve host 'blogsearch.google.com'

I haven't changed the httpd.conf file recently, neither the PHP settings or something. I thought about any possible update settings from my Fedora system, but no clue.

Restarted the apache server few times. The /etc/resolv.conf file was standard. One of the common failures is DNS server change and no flushing/refresh from the Apache. But mine was still there, no changes applied.

The solution was calling the httpd process via strace. It's been auto magic - just call it once via strace, then stop or kill the stracing process and start the server as normally. It worked here.

So, I stopped my apache server (which is in /usr/sbin/httpd here, could be in /usr/local/apache2 or /opt/lampp or somewhere else) and I reincarnated it that way:

strace -f -s 128 -o dbg /usr/sbin/httpd -k start

Once debugging started, the services updated by themselves. I killed the service and ran it again as usual:

/usr/sbin/httpd -k start

and everything went back to normal.

Thanks to maniax for the help 

del.icio.us Digg DZone Facebook Google Google Reader Magnolia reddit SlashDot Technorati ReadMe.ru Dobavi.com Dao.bg Lubimi.com Ping.bg Pipe.bg Svejo.net Web-bg.com