0

We recently moved to a new server. We have observed that the file upload done from the ftp command is taking around 5sec for 5MB file. But same file uploaded through CURL command is taking about 140 seconds. Any idea what could be wrong here ?

Cheers M

0

Uploading through FTP means transferring binary data directly to the filesystem using TCP.

Uploading throught cURL means transferring base64 encoded data (1.5x bigger) to the web server using HTTP (which uses TCP). The web application might create a 5MB memory object and then write it on disk, somewhere (it depends a lot on your application).

Do you know how is handled the upload on your HTTP server?

Nginx has a pretty decent module for that: nginx upload module

  • transferring through curl command also takes more time . So it has nothing to do with http server i guess. – Vidya Jan 13 '12 at 1:23
  • cURL uses your webserver, doesn't it? Can you past the cURL command you're using? – greut Jan 13 '12 at 8:02
  • curl -F name=yyy -F filename=@/xxx/xxxxx/somefile.txt someurl.com – Vidya Jan 13 '12 at 9:01
  • now, add -v, like curl -v -F name=yyy… you'll see that HTTP (and thus your webserver) is used. Apparently you can use FTP with curl too but you aren't in the example you gave me. – greut Jan 13 '12 at 9:08

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.