Re: [Cppcms-users] Many opened TCP files
Brought to you by:
artyom-beilis
|
From: CN <cn...@fa...> - 2016-10-07 05:40:18
|
On Wed, Oct 5, 2016, at 04:37 PM, Artyom Beilis wrote:
> It should.
>
> Several questions:
>
> 1. Who is the client - are these users or PROXY server?
CppCMS program runs in my host, which is behind CloudFlare's PROXY
network:
- Clients (browsers?) send http or https requests to my host.
- CloudFlare sends these requests to my host on behalf of these clients.
- These requests arrive at my host. Httpd converts http to https.
- CppCMS program responds to CloudFlare.
- CloudFlare responds results to clients using https.
> 2. What is the protocol? it appears as https in the list - is it
> HTTP/FastCGI or SGI
HTTPS/FastCGI
> 3. Post your my-confg.js - do you use http timeouts, what are they?
{
"service":{
"api":"fastcgi",
"socket":"/tmp/home.sock",
"disable_global_exit_handling":true
},
"session":{
"location":"client",
"expire":"browser",
"timeout":72000,
"cookies":{
"prefix":"home"
},
"client":{
"cbc":"aes",
"cbc_key":"my cbc key",
"hmac":"sha1",
"hmac_key":"my hmac key"
}
},
"daemon":{
"enable":false,
"lock":"/var/run/home.pid",
"user":"user2",
"group":"group2"
},
"http":{
"script_names":["/home"]
},
"cache":{
"backend":"thread_shared",
"limit":100
},
"security":{
"csrf":{"enable":true}
},
"logging":{
"level":"debug",
"stderr":false,
"syslog":{
"enable":true,
"id":"home"
}
}
}
Parameter "http.timeout" is not specified in configuration file. I
assume it defaults to 30 seconds according to
http://cppcms.com/wikipp/en/page/cppcms_1x_config#http.timeout
Last time when there was huge number of CLOSE_WAIT, those open
connections appeared to remain open regardless of the 30-second timeout.
They seemed to be not automatically closed by the time out mechanism.
> 4. What version of CppCMS do you use
version 1.2
> 5. Can you connect with strace to the server and see how typical
> connection behave - i.e. see what system calls related to a socket
> executed.
After I re-started CppCMS, I can no longer reproduce this problem -
"lsof" now prints only one CLOSE_WAIT entry. I know this is not
professional, but I will postpone trying strace until when the number of
CLOSE_WAIT surges again.
Best Regards,
CN
--
http://www.fastmail.com - Does exactly what it says on the tin
|