DNS problem

I just tried editing /home/yourdomain/fcgi-bin/php5.fcgi with nano as root, and couldn’t save - I get a permission denied error. Anyone know why?

In that case please check the attributes with lsattr and adjust accordingly.

@loyal: The php5.fcgi file by default has the “immutable” bit set, which prevents even root from changing it. You can, as snapmin pointed out, list those attributes with lsattr and change them with chattr.

Also, to check out your PHP issue, it might be an idea to try the Apache mod_php variant in addition to CGI and FCGI, to see if the problems arise from the calling method, or from the PHP code itself.

OK - I’m just doing a catchup here for anyone finding this in the future who might be confused by the meandering nature of this thread.

The problem here was not DNS - that was a separate issue and I misinterpreted it as being a symptom of the wider problem. The problem with bind was solved by changing a comma separated list of address on line 9 of /etc/named.conf file to “any” and restarting BIND.

Onto the mod_fcgid timing out issue. Using snapmin and locutus’s tips about the immutable bit, I was able to add the line to /home/yourdomain/fcgi-bin/php5.fcgi to allow many more concurrent fcgi processes, and this did help. The page stopped timing out, but it still took about four seconds to execute and I decided that I was not happy with this from a user experience perspective.

The code in question looked at about 4 RSS feeds, parsed them, sorted them, checked if the associated image link was good, if so grabbed the image, and returned a nearly formatted array containing the content we needed. We’ve now re-written the code to cache this every two hours, so every two hours one user will get the four second delay, while everyone else will get the page instantly.

The lesson I have learned here is that in the face of a serious server error, it’s better to address the source code of your site rather try and patch up your server to deliver code which is fundamentally too demanding to deliver.

Thanks for everyone’s help and I hope anyone else encountering this can use this thread to solve their problems in the future.