cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: Pipelining and POST requests

From: ru-17 <ru-17_at_yandex.ru>
Date: Tue, 28 Feb 2012 18:10:08 +0400

I got more details for the described problem.

Seems that pipelining is working, I configured Nginx to print the status of pipelining by using directive "$pipe" in log format. And almost in 70% of request has used pipeline.

I decided to check is there are real async or not, I sent bunches with no more than 5 simultaneous requests, and I configured my accepting server side to answer without delay to all except 1 specified request.
In Nginx logs I could see the time that was used for performing each query. and this time for all the queries except 1 is almost 0, but in curl I receive all answers one-by-one, and 4 queries after the slow one are came in only after the slow was done, but in Nginx and tcpdump I saw that they were sent without delay.

May be I've missed something, and there some core error in the way how I used curl.

Here is my model of curl using:
  1) init multi handle
  2) set CURLMOPT_PIPELINING,
  3) read as much requests from file as possible = 5-running_handles
  3) create easy handle
  4) set all request specific parameters to easy handle
  5) add easy handle into multi handle
  6) call curl_mult_perform() to initiate request sending
  7) calculate timeout by curl_mult_timeout() and goto select
  8) call one more time curl_mult_perform()
  9) start getting the data by curl_mult_info_read()
  10) goto 3

Please, could you point me to my error if it's exists, I tried to figure out what is going ou almost for week without success.

Thanks for the help,
  Denis.
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-02-28