Problem with blocking connect().

Vjacheslav Chekushin <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Organization LMT
Message-ID <[email protected]>
Hi, list.
I have problem with kannel 1.2.0.
In production enviroment I forced to use kannel 0.12.3.
If I use 1.2.0 under heavy load (realy not so 'heavy', it's about 1-2
request per second) then kannel periodically hangs up for some time.
After some investigation it seems I find where is the problem.
I think it is in http_start_request -> write_request -> conn_open_tcp.

There is remark at begining of conn.c :
TODO: have conn_open_tcp do a non-blocking connect().

So in my case connect blocks fairly often and kannel is
unusable.

Here the wapbox.log snapshot:

(added debug points in socket.c)
2002-10-21 09:46:14 [10] DEBUG: service=80
2002-10-21 09:46:14 [10] DEBUG: our service=0
2002-10-21 09:46:14 [10] DEBUG: hostname=wap.hotelguide.com
2002-10-21 09:46:14 [10] DEBUG: interface name=(null)
2002-10-21 09:46:14 [10] DEBUG: try to connect

In case of immediate return from connect here must be somethink like this:
2002-10-21 09:46:13 [10] DEBUG: HTTP: Sending request:
and request dumping but thread [10] hangs on this point


2002-10-21 09:46:14 [1] DEBUG: WSP: machine 0x8137688, state CONNECTED, event 
S-MethodResu
lt.req
2002-10-21 09:46:14 [1] DEBUG: WSP: method 105, state PROCESSING, event 
S-MethodResult.req
2002-10-21 09:46:14 [1] DEBUG: WSP 2/105: New method state REPLYING
2002-10-21 09:46:14 [1] DEBUG: WSP 2: New state CONNECTED
2002-10-21 09:46:14 [5] DEBUG: WTP: resp_machine 105, state RESULT_WAIT, event 
TR-Result.req.
2002-10-21 09:46:14 [5] DEBUG: WTP 105: New state RESULT_RESP_WAIT
2002-10-21 09:46:14 [5] DEBUG: WTP: Created WTPRespMachine 0x81658a0 (106)
2002-10-21 09:46:14 [5] DEBUG: WTP: resp_machine 106, state LISTEN, event RcvInvoke.
2002-10-21 09:46:14 [5] DEBUG: WTP 106: New state INVOKE_RESP_WAIT
2002-10-21 09:46:14 [1] DEBUG: WSP: machine 0x813efa8, state CONNECTED, event 
TR-Invoke.ind
2002-10-21 09:46:14 [1] DEBUG: WSP: method 106, state NULL_METHOD, event 
TR-Invoke.ind
2002-10-21 09:46:14 [1] DEBUG: WSP 6/106: New method state HOLDING
2002-10-21 09:46:14 [1] DEBUG: WSP: method 106, state HOLDING, event Release
2002-10-21 09:46:14 [1] DEBUG: WSP 6/106: New method state REQUESTING
2002-10-21 09:46:14 [1] DEBUG: WSP 6: New state CONNECTED
2002-10-21 09:46:14 [1] DEBUG: WSP: machine 0x813efa8, state CONNECTED, event 
S-MethodInvoke.res
2002-10-21 09:46:14 [1] DEBUG: WSP: method 106, state REQUESTING, event 
S-MethodInvoke.res
2002-10-21 09:46:14 [1] DEBUG: WSP 6/106: New method state PROCESSING
2002-10-21 09:46:14 [1] DEBUG: WSP 6: New state CONNECTED
2002-10-21 09:46:14 [5] DEBUG: WTP: resp_machine 106, state INVOKE_RESP_WAIT, 
event TR-Invoke.res.
2002-10-21 09:46:14 [5] DEBUG: WTP 106: New state RESULT_WAIT
2002-10-21 09:46:16 [5] DEBUG: WTP: resp_machine 105, state RESULT_RESP_WAIT, 
event RcvAck.
2002-10-21 09:46:16 [5] DEBUG: WTP 105: New state LISTEN
2002-10-21 09:46:16 [5] DEBUG: WTP: Destroying WTPRespMachine 0x8165f78 (105)
2002-10-21 09:46:16 [1] DEBUG: WSP: machine 0x8137688, state CONNECTED, event 
TR-Result.cnf
2002-10-21 09:46:16 [1] DEBUG: WSP: method 105, state REPLYING, event TR-Result.cnf
2002-10-21 09:46:16 [1] DEBUG: WSP 2/105: New method state NULL_METHOD
2002-10-21 09:46:16 [1] DEBUG: Destroying WSPMethodMachine 105
2002-10-21 09:46:16 [1] DEBUG: WSP 2: New state CONNECTED
2002-10-21 09:46:18 [5] DEBUG: WTP: Created WTPRespMachine 0x8157648 (107)
2002-10-21 09:46:18 [5] DEBUG: WTP: resp_machine 107, state LISTEN, event RcvInvoke.
2002-10-21 09:46:18 [5] DEBUG: WTP 107: New state INVOKE_RESP_WAIT
2002-10-21 09:46:18 [1] DEBUG: WSP: machine 0x8136530, state CONNECTED, event 
TR-Invoke.ind
2002-10-21 09:46:18 [1] DEBUG: WSP: method 107, state NULL_METHOD, event 
TR-Invoke.ind
2002-10-21 09:46:18 [1] DEBUG: WSP 12/107: New method state HOLDING
2002-10-21 09:46:18 [1] DEBUG: WSP: method 107, state HOLDING, event Release
2002-10-21 09:46:18 [1] DEBUG: WSP 12/107: New method state REQUESTING
2002-10-21 09:46:18 [1] DEBUG: WSP 12: New state CONNECTED
2002-10-21 09:46:18 [1] DEBUG: WSP: machine 0x8136530, state CONNECTED, event 
S-MethodInvoke.res
2002-10-21 09:46:18 [1] DEBUG: WSP: method 107, state REQUESTING, event 
S-MethodInvoke.res
2002-10-21 09:46:18 [1] DEBUG: WSP 12/107: New method state PROCESSING
2002-10-21 09:46:18 [1] DEBUG: WSP 12: New state CONNECTED
2002-10-21 09:46:18 [5] DEBUG: WTP: resp_machine 107, state INVOKE_RESP_WAIT, 
event TR-Invoke.res.
2002-10-21 09:46:18 [5] DEBUG: WTP 107: New state RESULT_WAIT
2002-10-21 09:46:18 [4] DEBUG: Timeout-A elapsed.
2002-10-21 09:46:18 [5] DEBUG: WTP: resp_machine 106, state RESULT_WAIT, event 
Timeout-A.
2002-10-21 09:46:18 [5] DEBUG: WTP 106: New state RESULT_WAIT
2002-10-21 09:46:19 [5] DEBUG: WTP: Created WTPRespMachine 0x815fb50 (108)
2002-10-21 09:46:19 [5] DEBUG: WTP: resp_machine 108, state LISTEN, event RcvInvoke.
2002-10-21 09:46:19 [5] DEBUG: WTP 108: New state INVOKE_RESP_WAIT


-- 
Vjacheslav Chekushin                                mailto:[email protected]
Latvian Mobile Phone Company                        http://www.lmt.lv
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.