We are using libcurl.so.4 as an external library in our application and while performing the HTTPS call to the third party credit card sso using libcurl library methods we are getting out of memory (27) error in our webspeed logs. This issue is intermittent and occurring frequently during high load. While investigating I found this error is coming while calling curl_easy_perform method in our curl.cls This method has been used as an external library method .
PROCEDURE curl_easy_perform EXTERNAL "{&LIBCURL}" CDECL PERSISTENT:
DEFINE INPUT PARAMETER ip-curl AS {&C_NULL_POINTER}.
DEFINE RETURN PARAMETER ip-code AS {&C_ENUM}.
END PROCEDURE.
Is their anyone who is using this external library and has faced the similar situation. Any help will be highly appreciated.
Thanks in Advance !!!
Thanks,
Ajay Dhyani,
Since you’ve mentioned Webspeed you most probably have a memory leak issue somewhere, either ‘unmanaged’ objects in 4GL like memptr/sax/dom that you forget to clean-up (always do the clean-up in a ‘finally’ block) or the library API require some ‘dispose’ methods to be called when done. If those are left behind each time you make a HTTP call through the library it will continue to build up and eventually the webspeed agent will die with that out-off-memory error.