[Cppcms-users] Many opened TCP files
Brought to you by:
artyom-beilis
From: CN <cn...@fa...> - 2016-09-28 06:47:33
|
/var/log/syslog: Sep 28 06:01:51 host1 cppcms-app: cppcms: Caught exception [Failed to read /dev/urandom]#0120x4302ad: booster::runtime_error::runtime_error(std::string const&) + 0x5d in /usr/local/bin/cppcms-app#0120x7fa3e52ea5e4: cppcms::urandom_device::generate(void*, unsigned int) + 0xa4 in /usr/local/lib/libcppcms.so.1#0120x7fa3e52ed961: cppcms::session_interface::generate_csrf_token() + 0x31 in /usr/local/lib/libcppcms.so.1#0120x7fa3e52f2e37: cppcms::session_interface::save() + 0x257 in /usr/local/lib/libcppcms.so.1#0120x7fa3e52694a3: cppcms::http::response::write_http_headers(std::ostream&) + 0x23 in /usr/local/lib/libcppcms.so.1#0120x7fa3e526b1f2: cppcms::http::response::out() + 0x542 in /usr/local/lib/libcppcms.so.1#0120x7fa3e527d024: cppcms::application::render(std::string, cppcms::base_content&) + 0x44 in /usr/local/lib/libcppcms.so.1#0120x454a40: user::login() + 0x690 in /usr/local/bin/cppcms-app#0120x456ae0: booster::function<void ()>::callable_impl<void, cppcms::url_dispatcher::binder0<user> >::call() + 0x30 in /usr/local/bin/cppcms-app#0120x7fa3e5289f61: ??? + 0xe5289f61 in /usr/local/lib/libcppcms.so.1#0120x7fa3e52828cd: cppcms::url_dispatcher::dispatch(std::string) + 0xdd in /usr/local/lib/libcppcms.so.1#0120x7fa3e524503b: cppcms::application::main(std::string) + 0x2b in /usr/local/lib/libcppcms.so.1#0120x7fa3e528257c: ??? + 0xe528257c in /usr/local/lib/libcppcms.so.1#0120x7fa3e52828cd: cppcms::url_dispatcher::dispatch(std::string) + 0xdd in /usr/local/lib/libcppcms.so.1#0120x42be40: multi_thread::main(std::string) + 0x470 in /usr/local/bin/cppcms-app#0120x7fa3e5275824: cppcms::http::context::dispatch(booster::intrusive_ptr<cppcms::application> const&, std::string const&, bool) + 0xa4 in /usr/local/lib/libcppcms.so.1#0120x7fa3e527678e: cppcms::http::context::dispatch(booster::shared_ptr<cppcms::application_specific_pool> const&, booster::shared_ptr<cppcms::http::context> const&, std::string const&) + 0x7e in /usr/local/lib/libcppcms.so.1#0120x7fa3e52786c3: cppcms::impl::thread_pool::worker() + 0xc3 in /usr/local/lib/libcppcms.so.1#0120x7fa3e566d52a: booster_thread_func + 0x1a in /usr/local/lib/libbooster.so.0#0120x7fa3e36e60a4: ??? + 0xe36e60a4 in /lib/x86_64-linux-gnu/libpthread.so.0#0120x7fa3e39e387d: clone + 0x6d in /lib/x86_64-linux-gnu/libc.so.6#012 (http_context.cpp:336) Sep 28 04:46:15 host1 cppcms-app: cppcms: Caught exception [cppdb::posgresql: failed to connect: could not create socket: Too many open files#012]#012 (http_context.cpp:336) Sep 28 04:46:15 host1 cppcms-app: cppcms: Caught exception [cppdb::posgresql: failed to connect: could not create socket: Too many open files#012]#012 (http_context.cpp:336) Sep 28 04:46:15 host1 cppcms-app: cppcms: Caught exception [cppdb::posgresql: failed to connect: could not create socket: Too many open files#012]#012 (http_context.cpp:336) -------------------- lsof | grep 104.16.51.3 | wc yields 5916 records like these: cppcms-app 27567 27591 root 1013u IPv4 1052388506 0t0 TCP host1:39384->104.16.54.3:https (CLOSE_WAIT) cppcms-app 27567 27591 root 1014u IPv4 1052388558 0t0 TCP host1:39390->104.16.54.3:https (CLOSE_WAIT) cppcms-app 27567 27591 root 1015u IPv4 1052388584 0t0 TCP host1:39394->104.16.54.3:https (CLOSE_WAIT) cppcms-app 27567 27591 root 1016u IPv4 1052388586 0t0 TCP host1:39400->104.16.54.3:https (CLOSE_WAIT) IP 104.16.54.3 is one of CloudFlare's host. -------------------- Process# 27567 comes from the running CppCMS program: ./cppcms-app -c my-config.js Is it possible that CppCMS does not cleanly close files? Best Regards, CN -- http://www.fastmail.com - Access your email from home and the web |