Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am getting the below exception when using PHP (5.3.22) HttpRequest

exception 'HttpInvalidParamException' with message 'Empty or too short HTTP message: ''' in /var/www/vhosts/mysite.com/httpdocs/myapp/info.php:0
 inner exception 'HttpRequestException' with message 'couldn't resolve host name; name lookup timed out (http://somesite.com)' 

This has been working well until today. No errors in apache logs. From the server I am able to ping the target site and also nslookup is returning the ip for that site.

I restarted apache as well as the server but the problem persists. HttpRequest is throwing exception (on send()) for all the urls other than the host site (localhost).

Is there any place/logs to check where I can track this problem?

share|improve this question

2 Answers 2

It may be possible that the resolver IP using by your command line ping and nslookup may be different than the one chosen by Apache / PHP. Can you verify that all your resolvers are up and answering DNS queries?

share|improve this answer
    
sometimes after I do a nslookup it works and after some time again the problem. still working on it. –  Praveen Jun 16 '13 at 15:16
    
So your resolvers stop responding? This could be a routing problem to your resolvers or the resolvers themselves having issues. Are you able to use other resolvers? –  Andy Shinn Jun 17 '13 at 15:30
    
After a day it started to work again :). –  Praveen Jun 18 '13 at 11:56
    
If you are no longer looking for an answer you should close this question or add the solution yourself and mark it as answered. –  Andy Shinn Jun 19 '13 at 15:24
    
I can't close the question as I don't have enough reputation. –  Praveen Jun 20 '13 at 4:57
up vote 0 down vote accepted

Wonder what is the problem but after a day it started to work again.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.