[OpenSIPS-Users] Increasing time to call new module´s method

Vlad Paiu vladpaiu at opensips.org
Thu Nov 15 11:31:52 CET 2012


Hello,

Do you initialise the libcurl session in the mod_init or child_init ?
If you want to have each process have it's own curl session, initialise 
it in child_init, as that function is ran after forking.

Regards,

Vlad Paiu
OpenSIPS Developer
http://www.opensips-solutions.com


On 11/12/2012 08:23 PM, Aldo Jose Spanghero Romao wrote:
>
> Hi,
>
> I´ve created a module that uses libcurl to send requests to a HTTP server.
>
> The problem is that the time to the function 'curl_easy_perform' be 
> called is increasing each time the method of the module is called.
>
> I´ve made some profiling, and looks like 'all' opensips' processes are 
> using the same instance of the module, calling the same function, and 
> not each process having its own copy of the module.
>
> This forces the next process to wait until the current one is finished 
> the call to the 'curl_easy_perform' function.
>
> Is there any way to force that each process uses its own copy of the 
> module, so the calls can be performed in parallel?
>
> Thank a lot for any tip!
>
> Regards
>
> Aldo
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20121115/77ae8b1a/attachment.htm>


More information about the Users mailing list