1

I'm running CentOS 6, and lately I'm having trouble with the server not being able to load external data after it's rebooted.

In the PHP configuration, I have fopen URI enabled, and it works, but as soon as I reboot the machine, the page that uses that function is unable to load any data, which persists even days after the machine has been rebooted. The function magically works again if I issue "sudo service httpd restart"

Does anyone have any ideas as to how to fix this?

Brandon
  • 111
  • 4

1 Answers1

1

Could just be a timing issue, that when it goes to load the data while booting, some other function is not yet ready that prevents this. Have you checked the logs for errors ? May need to manipulate the order of the start-up scripts.

Quick Google search finds: http://lists.centos.org/pipermail/centos/2005-December/015516.html and https://stackoverflow.com/questions/3164634/centos-init-scripts-dependecies

Little hard to be exact without more info.

kls
  • 379
  • 1
  • 6
  • I don't think it's a timing issue, because the script refuses to load data until the service is restarted, even days after the machine has been rebooted. To put it in perspective, the last reboot of the machine was Thursday, and the data could not be loaded until I restarted the service earlier today. I'll add this information to the original question. – Brandon Mar 05 '12 at 22:27
  • 1
    What do the logs say ? – kls Mar 05 '12 at 23:05
  • The PHP/Apache logs say that there's a "Temporary failure in name resolution" for all the external data. – Brandon Mar 06 '12 at 00:07
  • Where is the data located ? Symptoms suggest that it doesn't retry after the initial failure, thus you have to restart httpd. Then it is successful and continues to update until the next reboot. Of course that could be wrong, but it's certainly a good place to start. I stand by my first answer. You could try adding the remote server name to the hosts file and see what happens. – kls Mar 06 '12 at 01:10
  • As I said, it never tries to load the data until someone visits the page. It's not a problem with loading the data, it's a problem with Apache enabling the scripts to load the data in the first place. – Brandon Mar 06 '12 at 05:17