Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jewel: rgw: add socket backlog setting for via ceph.conf #10216

Merged
merged 1 commit into from Aug 22, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions src/common/config_opts.h
Expand Up @@ -1336,6 +1336,7 @@ OPTION(rgw_enable_usage_log, OPT_BOOL, false) // enable logging bandwidth usage
OPTION(rgw_ops_log_rados, OPT_BOOL, true) // whether ops log should go to rados
OPTION(rgw_ops_log_socket_path, OPT_STR, "") // path to unix domain socket where ops log can go
OPTION(rgw_ops_log_data_backlog, OPT_INT, 5 << 20) // max data backlog for ops log
OPTION(rgw_fcgi_socket_backlog, OPT_INT, 1024) // socket backlog for fcgi
OPTION(rgw_usage_log_flush_threshold, OPT_INT, 1024) // threshold to flush pending log data
OPTION(rgw_usage_log_tick_interval, OPT_INT, 30) // flush pending log data every X seconds
OPTION(rgw_intent_log_object_name, OPT_STR, "%Y-%m-%d-%i-%n") // man date to see codes (a subset are supported)
Expand Down
6 changes: 4 additions & 2 deletions src/rgw/rgw_fcgi_process.cc
Expand Up @@ -20,10 +20,12 @@ void RGWFCGXProcess::run()
string socket_path;
string socket_port;
string socket_host;
int socket_backlog;

conf->get_val("socket_path", "", &socket_path);
conf->get_val("socket_port", g_conf->rgw_port, &socket_port);
conf->get_val("socket_host", g_conf->rgw_host, &socket_host);
socket_backlog = g_conf->rgw_fcgi_socket_backlog;

if (socket_path.empty() && socket_port.empty() && socket_host.empty()) {
socket_path = g_conf->rgw_socket_path;
Expand Down Expand Up @@ -54,7 +56,7 @@ void RGWFCGXProcess::run()
}

const char *path = path_str.c_str();
sock_fd = FCGX_OpenSocket(path, SOCKET_BACKLOG);
sock_fd = FCGX_OpenSocket(path, socket_backlog);
if (sock_fd < 0) {
dout(0) << "ERROR: FCGX_OpenSocket (" << path << ") returned "
<< sock_fd << dendl;
Expand All @@ -66,7 +68,7 @@ void RGWFCGXProcess::run()
}
} else if (!socket_port.empty()) {
string bind = socket_host + ":" + socket_port;
sock_fd = FCGX_OpenSocket(bind.c_str(), SOCKET_BACKLOG);
sock_fd = FCGX_OpenSocket(bind.c_str(), socket_backlog);
if (sock_fd < 0) {
dout(0) << "ERROR: FCGX_OpenSocket (" << bind.c_str() << ") returned "
<< sock_fd << dendl;
Expand Down
1 change: 0 additions & 1 deletion src/rgw/rgw_process.h
Expand Up @@ -21,7 +21,6 @@
#define def_dout_subsys
#endif

#define SOCKET_BACKLOG 1024

extern void signal_shutdown();

Expand Down