Keith Sloan
Keith Sloan

Reputation: 55

Tracking down a PHP performance issue

I have a PHP script which runs fine on a Raspberry Pi PHP 5.4.4, but when I run the same script on a Cubieboard2 ( about twice the power of the Pi) PHP 5.4.6 I get a long delay. In both cases there is no caching of the PHP as far as I know. The problem seems to be with a file_get_contents request which is retrieving some xml from the web. Although if I enter the same information in a browser in the same system it comes back quickly enough.

There are no related entries in /var/log/apache2/error.log

Any ideas of how to track the problem down.

Thanks

Upvotes: 1

Views: 104

Answers (2)

Erik255
Erik255

Reputation: 1473

Could be a reverse DNS lookup with a invalid resolve setup. Check if apache(or your webserver) has set reverse dns for logging.

Check https://serverfault.com/questions/100225/apache-httpd-wont-stop-doing-reverse-dns-requests-for-clients-ips or just google it

And check if you can ping www.google.at from a shell.

Upvotes: 0

Martin Diphoorn
Martin Diphoorn

Reputation: 81

Check if both systems have the same settings for ipv6. Some distributions have ipv6 enabled and tries that before ipv4.

Upvotes: 1

Related Questions