PHP CURL Performance

hi,

i'm not sure if this is the right place for this question. sort of fits into two categories

i have a server on which i am running a PHP app. it makes lots of CURL requests off to other sites.
i have setup a second server with the exact same spec as the first server, to do the exact same job. however the CURL requests are considerably slower from the new server than from the old server. in the region of 2 to 5 seconds slower.

anyone got any ideas why? is there a CURL optimisation or diagnostic i can run??

both the servers have the same setup. i recently installed PHPA on the second server. it was already installed on the first server. as far as i can tell PHPA does not support command line PHP apps(like mine). i can confirm that PHPA runs fine on both servers for pages that are served up by apache. can it be configured to cache command line scripts? could this be where the difference is between the two servers??

as you cxan probably tell i am at a loss with this one so any and all help would be appreciated.

thanks
FatlogAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
neesterConnect With a Mentor Commented:
Hmm.
If the servers are identical - all I can suggest is that your server could be hooked into a router with a dodgy routing table and its just taking a long time to find the hosts.

Try running traceroutes from Putty from each server to a standard address - ie. google. or one of the sites you CURL to.
compare the time and number of hops it makes.
if they are relatively the same, then it is a server issue, not a network issue.
0
 
FatlogAuthor Commented:
i did up some CURL tests and posted the results to my server provider.

turns out the server was connected to a 10Mb/s switch by mistake. they switched it to 100mb/s and the response times in my test now match those of my first server.

thanks for your help!
0
 
neesterCommented:
Ahh see :)

Computers are just dumb boxes that do what we tell them...
If its not working as it should - its either the instruction, or the hardware...
Since the instruction is the same - must be hardware...

Cheers mate!
Glad you got your result!

- Chris
0
All Courses

From novice to tech pro — start learning today.