0

I have created an API and hosted in windows IIS server. I checked the performance of the API on browser and its consistent ~200 ms.

But when I try to access the API with curl on debian, it slows down with starttransfer time being upto 20 to 30 seconds.

This is what I expect

curl -w "@curl-format.txt" -o /dev/null -s "http://api"
    time_namelookup:  0.001
       time_connect:  0.002
    time_appconnect:  0.000
   time_pretransfer:  0.002
      time_redirect:  0.000
 time_starttransfer:  0.169
                    ----------
         time_total:  0.170

Occasional inconsistency

curl -w "@curl-format.txt" -o /dev/null -s "http://api"
       time_namelookup:  0.001
       time_connect:  0.001
    time_appconnect:  0.000
   time_pretransfer:  0.001
      time_redirect:  0.000
 time_starttransfer:  10.987
                    ----------
         time_total:  10.987

Any thoughts or ideas on how to fix this ?

I don't have any clue on what's going wrong.

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.