Hi All, Good Day, I have been seeing opensips creating mutiple(duplicate) TCP connections to the same destination if hit with heavy call load.
*What do i mean?* opensips ip : 10.10.10.1 Destination : 10.10.10.2 Tcp Children : 32 Ideally opensips will create only one tcp connections and reuses it,if there's a heavy call load i see there are several tcp connections which are created to the same destination. I believe here's the root cause : - When a child tries to find a connection to the destination it calls _tcpconn_find() (assuming we are using ip and not id) system checks tcpconn_aliases_hash for the connection info. this map is maintained by the parent process and each child lock its while reaing tcpconn_get().in order to simulate the scenario lets assume a-> parent->state is BAD this method will return null and so the child tries to create a new connections,assuming there's a second child trying to find the same connections and goes through the same process - Now each child thinks there's no connection to the destination and calls tcpconn_connect() this will create a socket to the destination and passes over the fd to the main process to update the has map. - Not sure if tcp_connect() should have locking mechanism as in tcpconn_get(). Please correct me if my understanding is wrong,please share your thoughts. Thank you. Regards, Ravitez.D
_______________________________________________ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users