forked from Mirrors/privacore-open-source-search-engine
Configurable max udp slots
This commit is contained in:
1
Conf.cpp
1
Conf.cpp
@ -105,6 +105,7 @@ Conf::Conf ( ) {
|
||||
m_isLive = false;
|
||||
m_maxTotalSpiders = 0;
|
||||
m_indexdbMaxIndexListAge = 0;
|
||||
m_udpMaxSockets = 0;
|
||||
m_httpMaxSockets = 0;
|
||||
m_httpsMaxSockets = 0;
|
||||
m_httpMaxSendBufSize = 0;
|
||||
|
2
Conf.h
2
Conf.h
@ -188,6 +188,8 @@ class Conf {
|
||||
// indexdb has a max cached age for getting IndexLists (10 mins deflt)
|
||||
int32_t m_indexdbMaxIndexListAge;
|
||||
|
||||
int32_t m_udpMaxSockets;
|
||||
|
||||
// TODO: parse these out!!!!
|
||||
int32_t m_httpMaxSockets;
|
||||
int32_t m_httpsMaxSockets;
|
||||
|
@ -4862,6 +4862,14 @@ void Parms::init ( ) {
|
||||
m->m_page = PAGE_MASTER;
|
||||
m++;
|
||||
|
||||
m->m_title = "max udp sockets";
|
||||
m->m_desc = "Sockets available for incoming/outgoing UDP request. (Changes requires restart)";
|
||||
m->m_cgi = "mus";
|
||||
simple_m_set(Conf,m_udpMaxSockets);
|
||||
m->m_def = "3500";
|
||||
m->m_page = PAGE_MASTER;
|
||||
m++;
|
||||
|
||||
m->m_title = "max http sockets";
|
||||
m->m_desc = "Maximum sockets available to serve incoming HTTP "
|
||||
"requests. Too many outstanding requests will increase "
|
||||
|
6
main.cpp
6
main.cpp
@ -796,7 +796,7 @@ int main2 ( int argc , char *argv[] ) {
|
||||
20000000 , // readBufSIze
|
||||
20000000 , // writeBufSize
|
||||
20 , // pollTime in ms
|
||||
3500 , // max udp slots
|
||||
g_conf.m_udpMaxSockets , // max udp slots
|
||||
false )){ // is dns?
|
||||
log( LOG_ERROR, "db: UdpServer init failed." );
|
||||
return 1;
|
||||
@ -1722,7 +1722,7 @@ int main2 ( int argc , char *argv[] ) {
|
||||
40000000 , // readBufSIze
|
||||
20000000 , // writeBufSize
|
||||
20 , // pollTime in ms
|
||||
3500 , // max udp slots
|
||||
g_conf.m_udpMaxSockets , // max udp slots
|
||||
false )){ // is dns?
|
||||
log("db: UdpServer init failed." ); return 1; }
|
||||
|
||||
@ -1894,7 +1894,7 @@ void doCmdAll ( int fd, void *state ) {
|
||||
20000000 , // readBufSIze
|
||||
20000000 , // writeBufSize
|
||||
20 , // pollTime in ms
|
||||
3500 , // max udp slots
|
||||
g_conf.m_udpMaxSockets , // max udp slots
|
||||
false )){ // is dns?
|
||||
log("db: UdpServer init on port 18123 failed: %s" ,
|
||||
mstrerror(g_errno));
|
||||
|
Reference in New Issue
Block a user