Closed TellusTalk closed 11 years ago
This problem is not related to Haraka. It had to do with incorrect use of nodes http.request, which is utilizing socket pooling. The socket assigned to your request is not automatically returned to the pool. Make sure to do it manually or you will run out of sockets and performance will be severally degraded.
Use one of these options to solve this problem
Example: The problem fixed using, post_response.resume();
post_request = http.request(post_options, function (post_response) {
haraka_log('http_post_file', 'post_response', ' post_response.statusCode = ' + post_response.statusCode + ' : ' + filename_in);
if (post_response.statusCode === 200) {
delete_file(filename_in);
} else {
move_file(filename_in);//Posted later by retry script;
}
post_response.resume(); //This line solves the problem and returns the socket to the pool.
});//post_request = http.request(post_options, function(post_response) {
Hi! I'm having Haraka to Http Post inbound Emails to our Server. A few times a day the Http Post is delay for quite some time.
[Log example 8 minutes "late" Oct 7 09:06:31 future haraka[9021]: [INFO] [-] [core] [HttpMail] [http_post_file] [Before http.request] trio@engelholm.se_2013-10-07T09:06:31.750Z_4B83744B-A217-4FC5-8A5D-BBA1BD1B0DE9
Oct 7 09:14:44 future haraka[9021]: [INFO] [-] [core] [HttpMail] [http_post_file] [post_response] post_response.statusCode = 200 : trio@engelholm.se_2013-10-07T09:06:31.750Z_4B83744B-A217-4FC5-8A5D-BBA1BD1B0DE9
Maybe I'm not implementing the plugin correct grateful for help. My plugin code below.
Thanks /Peter
var
exports.hook_queue = function (next, connection, params) {
};//exports.hook_queue = function(next, connection, params) {