Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am developing an application, which uses CURL to establish connection to Facebook. 4 of 5 executions are fine, while 1 of 5 hangs. That what CURL trace says:

== Info: About to connect() to graph.facebook.com port 443 (#0)
== Info:   Trying 31.13.64.48... == Info: connected
== Info: successfully set certificate verify locations:
== Info:   CAfile: none
CApath: /etc/ssl/certs
== Info: SSLv3, TLS handshake, Client hello (1):
=> Send SSL data, 243 bytes (0xf3)
0000: 01 00 00 ef 03 02 52 01 11 52 14 81 5f b0 da 99 ......R..R.._...
0010: 60 57 ff 3a 29 d6 4d 64 13 7b fb 49 b1 90 32 58 `W.:).Md.{.I..2X
0020: 09 e4 b3 10 c7 46 00 00 66 c0 14 c0 0a c0 22 c0 .....F..f.....".
0030: 21 00 39 00 38 00 88 00 87 c0 0f c0 05 00 35 00 !.9.8.........5.
0040: 84 c0 12 c0 08 c0 1c c0 1b 00 16 00 13 c0 0d c0 ................
0050: 03 00 0a c0 13 c0 09 c0 1f c0 1e 00 33 00 32 00 ............3.2.
0060: 9a 00 99 00 45 00 44 c0 0e c0 04 00 2f 00 96 00 ....E.D...../...
0070: 41 c0 11 c0 07 c0 0c c0 02 00 05 00 04 00 15 00 A...............
0080: 12 00 09 00 14 00 11 00 08 00 06 00 03 00 ff 01 ................
0090: 00 00 60 00 00 00 17 00 15 00 00 12 67 72 61 70 ..`.........grap
00a0: 68 2e 66 61 63 65 62 6f 6f 6b 2e 63 6f 6d 00 0b h.facebook.com..
00b0: 00 04 03 00 01 02 00 0a 00 34 00 32 00 0e 00 0d .........4.2....
00c0: 00 19 00 0b 00 0c 00 18 00 09 00 0a 00 16 00 17 ................
00d0: 00 08 00 06 00 07 00 14 00 15 00 04 00 05 00 12 ................
00e0: 00 13 00 01 00 02 00 03 00 0f 00 10 00 11 00 0f ................
00f0: 00 01 01                                        ...
== Info: SSLv3, TLS handshake, Server hello (2):
<= Recv SSL data, 90 bytes (0x5a)
0000: 02 00 00 56 03 02 52 01 11 53 f2 cc 8c 8e de cd ...V..R..S......
0010: 99 84 de 68 70 fe e8 d6 e7 54 b3 ac fb 87 67 81 ...hp....T....g.
0020: 01 07 33 54 72 dc 20 c5 34 d1 9c 0b ac 8c 13 cb ..3Tr. .4.......
0030: 69 3f 18 59 97 bb ec eb da c7 10 2b ec 62 84 b0 i?.Y.......+.b..
0040: ca 95 c3 44 f8 a8 cc 00 05 00 00 0e 00 00 00 00 ...D............
0050: ff 01 00 01 00 00 0f 00 01 01                   ..........
== Info: SSLv3, TLS handshake, CERT (11):
<= Recv SSL data, 1888 bytes (0x760)
0000: 0b 00 07 5c 00 07 59 00 03 cc 30 82 03 c8 30 82 ...\..Y...0...0.
0010: 03 31 a0 03 02 01 02 02 10 01 7f 77 de b3 bc bb .1........w....
0020: 23 5d 44 cc c7 db a6 2e 72 30 0d 06 09 2a 86 48 #]D.....r0...*.H
0030: 86 f7 0d 01 01 05 05 00 30 81 ba 31 1f 30 1d 06 ........0..1.0..
0040: 03 55 04 0a 13 16 56 65 72 69 53 69 67 6e 20 54 .U....VeriSign T
0050: 72 75 73 74 20 4e 65 74 77 6f 72 6b 31 17 30 15 rust Network1.0.
0060: 06 03 55 04 0b 13 0e 56 65 72 69 53 69 67 6e 2c ..U....VeriSign,
0070: 20 49 6e 63 2e 31 33 30 31 06 03 55 04 0b 13 2a  Inc.1301..U...*
0080: 56 65 72 69 53 69 67 6e 20 49 6e 74 65 72 6e 61 VeriSign Interna
0090: 74 69 6f 6e 61 6c 20 53 65 72 76 65 72 20 43 41 tional Server CA
00a0: 20 2d 20 43 6c 61 73 73 20 33 31 49 30 47 06 03  - Class 31I0G..
00b0: 55 04 0b 13 40 77 77 77 2e 76 65 72 69 73 69 67 U...@www.verisig
00c0: 6e 2e 63 6f 6d 2f 43 50 53 20 49 6e 63 6f 72 70 n.com/CPS Incorp
00d0: 2e 62 79 20 52 65 66 2e 20 4c 49 41 42 49 4c 49 .by Ref. LIABILI
00e0: 54 59 20 4c 54 44 2e 28 63 29 39 37 20 56 65 72 TY LTD.(c)97 Ver
00f0: 69 53 69 67 6e 30 1e 17 0d 31 32 30 36 32 31 30 iSign0...1206210
0100: 30 30 30 30 30 5a 17 0d 31 33 31 32 33 31 32 33 00000Z..13123123
0110: 35 39 35 39 5a 30 68 31 0b 30 09 06 03 55 04 06 5959Z0h1.0...U..
0120: 13 02 55 53 31 13 30 11 06 03 55 04 08 13 0a 43 ..US1.0...U....C
0130: 61 6c 69 66 6f 72 6e 69 61 31 12 30 10 06 03 55 alifornia1.0...U
0140: 04 07 13 09 50 61 6c 6f 20 41 6c 74 6f 31 17 30 ....Palo Alto1.0
0150: 15 06 03 55 04 0a 13 0e 46 61 63 65 62 6f 6f 6b ...U....Facebook
0160: 2c 20 49 6e 63 2e 31 17 30 15 06 03 55 04 03 14 , Inc.1.0...U...
0170: 0e 2a 2e 66 61 63 65 62 6f 6f 6b 2e 63 6f 6d 30 .*.facebook.com0
0180: 81 9f 30 0d 06 09 2a 86 48 86 f7 0d 01 01 01 05 ..0...*.H.......
0190: 00 03 81 8d 00 30 81 89 02 81 81 00 ae 94 b1 71 .....0.........q
01a0: e2 de cc c1 69 3e 05 10 63 24 01 02 e0 68 9a e8 ....i>..c$...h..
01b0: 3c 39 b6 b3 e7 4b 97 d4 8d 7b 23 68 91 00 b0 b4 <9...K...{#h....
01c0: 96 ee 62 f0 e6 d3 56 bc f4 aa 0f 50 64 34 02 f5 ..b...V....Pd4..
01d0: d1 76 6a a9 72 83 5a 75 64 72 3f 39 bb ef 52 90 .vj.r.Zudr?9..R.
01e0: de d9 bc db f9 d3 d5 5d fa d2 3a a0 3d c6 04 c5 .......]..:.=...
01f0: 4d 29 cf 1d 4b 3b db d1 a8 09 cf ae 47 b4 4c 7e M)..K;......G.L~
0200: ae 17 c5 10 9b ee 24 a9 cf 4a 8d 91 1b b0 fd 04 ......$..J......
0210: 15 ae 4c 3f 43 0a a1 2a 55 7e 2a e1 02 03 01 00 ..L?C..*U~*.....
0220: 01 a3 82 01 1e 30 82 01 1a 30 09 06 03 55 1d 13 .....0...0...U..
0230: 04 02 30 00 30 44 06 03 55 1d 20 04 3d 30 3b 30 ..0.0D..U. .=0;0
0240: 39 06 0b 60 86 48 01 86 f8 45 01 07 17 03 30 2a 9..`.H...E....0*
0250: 30 28 06 08 2b 06 01 05 05 07 02 01 16 1c 68 74 0(..+.........ht
0260: 74 70 73 3a 2f 2f 77 77 77 2e 76 65 72 69 73 69 tps://www.verisi
0270: 67 6e 2e 63 6f 6d 2f 72 70 61 30 3c 06 03 55 1d gn.com/rpa0<..U.
0280: 1f 04 35 30 33 30 31 a0 2f a0 2d 86 2b 68 74 74 ..50301./.-.+htt
0290: 70 3a 2f 2f 53 56 52 49 6e 74 6c 2d 63 72 6c 2e p://SVRIntl-crl.
02a0: 76 65 72 69 73 69 67 6e 2e 63 6f 6d 2f 53 56 52 verisign.com/SVR
02b0: 49 6e 74 6c 2e 63 72 6c 30 1d 06 03 55 1d 25 04 Intl.crl0...U.%.
02c0: 16 30 14 06 08 2b 06 01 05 05 07 03 01 06 08 2b .0...+.........+
02d0: 06 01 05 05 07 03 02 30 0b 06 03 55 1d 0f 04 04 .......0...U....
02e0: 03 02 05 a0 30 34 06 08 2b 06 01 05 05 07 01 01 ....04..+.......
02f0: 04 28 30 26 30 24 06 08 2b 06 01 05 05 07 30 01 .(0&0$..+.....0.
0300: 86 18 68 74 74 70 3a 2f 2f 6f 63 73 70 2e 76 65 ..http://ocsp.ve
0310: 72 69 73 69 67 6e 2e 63 6f 6d 30 27 06 03 55 1d risign.com0'..U.
0320: 11 04 20 30 1e 82 0e 2a 2e 66 61 63 65 62 6f 6f .. 0...*.faceboo
0330: 6b 2e 63 6f 6d 82 0c 66 61 63 65 62 6f 6f 6b 2e k.com..facebook.
0340: 63 6f 6d 30 0d 06 09 2a 86 48 86 f7 0d 01 01 05 com0...*.H......
0350: 05 00 03 81 81 00 5b 6c 2b 75 f8 ed 30 aa 51 aa ......[l+u..0.Q.
0360: d3 6a ba 59 5e 55 51 41 95 1f 81 a5 3b 44 79 10 .j.Y^UQA....;Dy.
0370: ac 1f 76 ff 78 fc 27 81 61 6b 58 f3 12 2a fc 1c ..v.x.'.akX..*..
0380: 87 01 04 25 e9 ed 43 df 1a 7b a6 49 80 60 67 e2 ...%..C..{.I.`g.
0390: 68 8a f0 3d b5 8c 7d f4 ee 03 30 9a 6a fc 24 7c h..=..}...0.j.$|
03a0: cb 13 4d c3 3e 54 c6 bc 1d 51 33 a5 32 a7 32 73 ..M.>T...Q3.2.2s
03b0: b1 d7 9c ad c0 8e 7e 1a 83 11 6d 34 52 33 40 b0 ......~...m4R3@.
03c0: 30 54 27 a2 17 42 82 7c 98 91 66 98 ee 7e af 8c 0T'..B.|..f..~..
03d0: 3b dd 71 70 08 17 00 03 87 30 82 03 83 30 82 02 ;.qp.....0...0..
03e0: ec a0 03 02 01 02 02 10 46 fc eb ba b4 d0 2f 0f ........F...../.
03f0: 92 60 98 23 3f 93 07 8f 30 0d 06 09 2a 86 48 86 .`.#?...0...*.H.
0400: f7 0d 01 01 05 05 00 30 5f 31 0b 30 09 06 03 55 .......0_1.0...U
0410: 04 06 13 02 55 53 31 17 30 15 06 03 55 04 0a 13 ....US1.0...U...
0420: 0e 56 65 72 69 53 69 67 6e 2c 20 49 6e 63 2e 31 .VeriSign, Inc.1
0430: 37 30 35 06 03 55 04 0b 13 2e 43 6c 61 73 73 20 705..U....Class 
0440: 33 20 50 75 62 6c 69 63 20 50 72 69 6d 61 72 79 3 Public Primary
0450: 20 43 65 72 74 69 66 69 63 61 74 69 6f 6e 20 41  Certification A
0460: 75 74 68 6f 72 69 74 79 30 1e 17 0d 39 37 30 34 uthority0...9704
0470: 31 37 30 30 30 30 30 30 5a 17 0d 31 36 31 30 32 17000000Z..16102
0480: 34 32 33 35 39 35 39 5a 30 81 ba 31 1f 30 1d 06 4235959Z0..1.0..
0490: 03 55 04 0a 13 16 56 65 72 69 53 69 67 6e 20 54 .U....VeriSign T
04a0: 72 75 73 74 20 4e 65 74 77 6f 72 6b 31 17 30 15 rust Network1.0.
04b0: 06 03 55 04 0b 13 0e 56 65 72 69 53 69 67 6e 2c ..U....VeriSign,
04c0: 20 49 6e 63 2e 31 33 30 31 06 03 55 04 0b 13 2a  Inc.1301..U...*
04d0: 56 65 72 69 53 69 67 6e 20 49 6e 74 65 72 6e 61 VeriSign Interna
04e0: 74 69 6f 6e 61 6c 20 53 65 72 76 65 72 20 43 41 tional Server CA
04f0: 20 2d 20 43 6c 61 73 73 20 33 31 49 30 47 06 03  - Class 31I0G..
0500: 55 04 0b 13 40 77 77 77 2e 76 65 72 69 73 69 67 U...@www.verisig
0510: 6e 2e 63 6f 6d 2f 43 50 53 20 49 6e 63 6f 72 70 n.com/CPS Incorp
0520: 2e 62 79 20 52 65 66 2e 20 4c 49 41 42 49 4c 49 .by Ref. LIABILI
0530: 54 59 20 4c 54 44 2e 28 63 29 39 37 20 56 65 72 TY LTD.(c)97 Ver
0540: 69 53 69 67 6e 30 81 9f 30 0d 06 09 2a 86 48 86 iSign0..0...*.H.
0550: f7 0d 01 01 01 05 00 03 81 8d 00 30 81 89 02 81 ...........0....
0560: 81 00 d8 82 80 e8 d6 19 02 7d 1f 85 18 39 25 a2 .........}...9%.
0570: 65 2b e1 bf d4 05 d3 bc e6 36 3b aa f0 4c 6c 5b e+.......6;..Ll[
0580: b6 e7 aa 3c 73 45 55 b2 f1 bd ea 97 42 ed 9a 34 ...<sEU.....B..4
0590: 0a 15 d4 a9 5c f5 40 25 dd d9 07 c1 32 b2 75 6c ....\.@%....2.ul
05a0: c4 ca bb a3 fe 56 27 71 43 aa 63 f5 30 3e 93 28 .....V'qC.c.0>.(
05b0: e5 fa f1 09 3b f3 b7 4d 4e 39 f7 5c 49 5a b8 c1 ....;..MN9.\IZ..
05c0: 1d d3 b2 8a fe 70 30 95 42 cb fe 2b 51 8b 5a 3c .....p0.B..+Q.Z<
05d0: 3a f9 22 4f 90 b2 02 a7 53 9c 4f 34 e7 ab 04 b2 :."O....S.O4....
05e0: 7b 6f 02 03 01 00 01 a3 81 e3 30 81 e0 30 0f 06 {o........0..0..
05f0: 03 55 1d 13 04 08 30 06 01 01 ff 02 01 00 30 44 .U....0.......0D
0600: 06 03 55 1d 20 04 3d 30 3b 30 39 06 0b 60 86 48 ..U. .=0;09..`.H
0610: 01 86 f8 45 01 07 01 01 30 2a 30 28 06 08 2b 06 ...E....0*0(..+.
0620: 01 05 05 07 02 01 16 1c 68 74 74 70 73 3a 2f 2f ........https://
0630: 77 77 77 2e 76 65 72 69 73 69 67 6e 2e 63 6f 6d www.verisign.com
0640: 2f 43 50 53 30 34 06 03 55 1d 25 04 2d 30 2b 06 /CPS04..U.%.-0+.
0650: 08 2b 06 01 05 05 07 03 01 06 08 2b 06 01 05 05 .+.........+....
0660: 07 03 02 06 09 60 86 48 01 86 f8 42 04 01 06 0a .....`.H...B....
0670: 60 86 48 01 86 f8 45 01 08 01 30 0b 06 03 55 1d `.H...E...0...U.
0680: 0f 04 04 03 02 01 06 30 11 06 09 60 86 48 01 86 .......0...`.H..
0690: f8 42 01 01 04 04 03 02 01 06 30 31 06 03 55 1d .B........01..U.
06a0: 1f 04 2a 30 28 30 26 a0 24 a0 22 86 20 68 74 74 ..*0(0&.$.". htt
06b0: 70 3a 2f 2f 63 72 6c 2e 76 65 72 69 73 69 67 6e p://crl.verisign
06c0: 2e 63 6f 6d 2f 70 63 61 33 2e 63 72 6c 30 0d 06 .com/pca3.crl0..
06d0: 09 2a 86 48 86 f7 0d 01 01 05 05 00 03 81 81 00 .*.H............
06e0: 40 8e 49 97 96 8a 73 dd 8e 4d ef 3e 61 b7 ca a0 @.I...s..M.>a...
06f0: 62 ad f4 0e 0a bb 75 3d e2 6e d8 2c c7 bf f4 b9 b.....u=.n.,....
0700: 8c 36 9b ca a2 d0 9c 72 46 39 f6 a6 82 03 65 11 .6.....rF9....e.
0710: c4 bc bf 2d a6 f5 d9 3b 0a b5 98 fa b3 78 b9 1e ...-...;.....x..
0720: f2 2b 4c 62 d5 fd b2 7a 1d df 33 fd 73 f9 a5 d8 .+Lb...z..3.s...
0730: 2d 8c 2a ea d1 fc b0 28 b6 e9 49 48 13 4b 83 8a -.*....(..IH.K..
0740: 1b 48 7b 24 f7 38 de 6f 41 54 b8 ab 57 6b 06 df .H{$.8.oAT..Wk..
0750: c7 a2 d4 a9 f6 f1 36 62 80 88 f2 8b 75 d6 80 71 ......6b....u..q
== Info: SSLv3, TLS handshake, Server finished (14):
<= Recv SSL data, 4 bytes (0x4)
0000: 0e 00 00 00                                     ....
== Info: SSLv3, TLS handshake, Client key exchange (16):
=> Send SSL data, 134 bytes (0x86)
0000: 10 00 00 82 00 80 43 bb cc dc c4 c5 16 95 46 e9 ......C.......F.
0010: 48 0d 57 25 45 c6 0c e8 86 18 21 60 4e b7 1c 19 H.W%E.....!`N...
0020: a6 b4 03 b5 6b a1 77 57 3b 25 6c c4 66 12 2a ef ....k.wW;%l.f.*.
0030: 6b 65 d5 07 15 84 d7 39 0c 57 03 7e 56 2f 40 5d ke.....9.W.~V/@]
0040: 38 46 c2 6e 41 3d 35 04 96 a3 2f d0 cf c7 38 c1 8F.nA=5.../...8.
0050: f4 00 e3 0c d9 49 d5 6e 4c 53 d7 fb 2d 43 ef 83 .....I.nLS..-C..
0060: 99 43 d3 3f 10 fa ae a9 87 02 07 fd 15 99 01 03 .C.?............
0070: fb 21 71 ea 3b ff b7 23 74 b7 da b4 e3 2e b1 b7 .!q.;..#t.......
0080: ac 97 a0 02 dd 5c                               .....\
== Info: SSLv3, TLS change cipher, Client hello (1):
=> Send SSL data, 1 bytes (0x1)
0000: 01                                              .
== Info: SSLv3, TLS handshake, Finished (20):
=> Send SSL data, 16 bytes (0x10)
0000: 14 00 00 0c 2c 9d 40 c1 cf 6a 26 da 9f 23 59 fa ....,.@..j&..#Y.
== Info: SSLv3, TLS change cipher, Client hello (1):
<= Recv SSL data, 1 bytes (0x1)
0000: 01                                              .
== Info: SSLv3, TLS handshake, Finished (20):
<= Recv SSL data, 16 bytes (0x10)
0000: 14 00 00 0c 57 a3 bc d6 80 ed 38 99 7d 78 e0 d2 ....W.....8.}x..
== Info: SSL connection using RC4-SHA
== Info: Server certificate:
== Info:     subject: C=US; ST=California; L=Palo Alto; O=Facebook, Inc.; CN=*.facebook.com
== Info:     start date: 2012-06-21 00:00:00 GMT
== Info:     expire date: 2013-12-31 23:59:59 GMT
== Info:     subjectAltName: graph.facebook.com matched
== Info:     issuer: O=VeriSign Trust Network; OU=VeriSign, Inc.; OU=VeriSign International Server CA - Class 3; OU=www.verisign.com/CPS Incorp.by Ref. LIABILITY LTD.(c)97 VeriSign
== Info:     SSL certificate verify ok.
=> Send header, 174 bytes (0xae)
0000: 48 45 41 44 20 2f 31 30 30 20 48 54 54 50 2f 31 HEAD /100 HTTP/1
0010: 2e 31 0d 0a 55 73 65 72 2d 41 67 65 6e 74 3a 20 .1..User-Agent: 
0020: 63 75 72 6c 2f 37 2e 32 32 2e 30 20 28 78 38 36 curl/7.22.0 (x86
0030: 5f 36 34 2d 70 63 2d 6c 69 6e 75 78 2d 67 6e 75 _64-pc-linux-gnu
0040: 29 20 6c 69 62 63 75 72 6c 2f 37 2e 32 32 2e 30 ) libcurl/7.22.0
0050: 20 4f 70 65 6e 53 53 4c 2f 31 2e 30 2e 31 20 7a  OpenSSL/1.0.1 z
0060: 6c 69 62 2f 31 2e 32 2e 33 2e 34 20 6c 69 62 69 lib/1.2.3.4 libi
0070: 64 6e 2f 31 2e 32 33 20 6c 69 62 72 74 6d 70 2f dn/1.23 librtmp/
0080: 32 2e 33 0d 0a 48 6f 73 74 3a 20 67 72 61 70 68 2.3..Host: graph
0090: 2e 66 61 63 65 62 6f 6f 6b 2e 63 6f 6d 0d 0a 41 .facebook.com..A
00a0: 63 63 65 70 74 3a 20 2a 2f 2a 0d 0a 0d 0a       ccept: */*....

CURL version info:

curl 7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
Protocols: dict file ftp ftps gopher http https imap imaps ldap pop3 pop3s rtmp rtsp smtp smtps telnet tftp
Features: GSS-Negotiate IDN IPv6 Largefile NTLM NTLM_WB SSL libz TLS-SRP

I am desperately asking for help. Why could it happen?

share|improve this question
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.