Tim Hanssen
Tim Hanssen

Reputation: 159

cURL API Extremely Slow

I have created many websites that get all there data from a API. (located on the same server on most cases).

The websites are operation really slow, of all the curl requests.

I first thought it was our mysql server (sepparate server) but now we implemented caching it's still slow.

Is there a good way to find out why it takes so long to do the curl requests. And what would be a good way to go?

Upvotes: 0

Views: 1587

Answers (2)

Tim Hanssen
Tim Hanssen

Reputation: 159

The problem is not the cURL request.

Upvotes: 0

Craig Taub
Craig Taub

Reputation: 4179

Could use a browser rest client to point to your API and use a profiling tool (xdebug/xhprof) to find the source of the bottleneck. Possibly make sure the api calls resolve locally and dont go all the way out to the internet before coming back in (but may not shave off much time). Would recommend starting with the APIs code.

Upvotes: 1

Related Questions