Support #660
When system-v service fails to advertise doe to max servers per service is full shall return error
Status: | New | Start date: | 03/28/2021 | |
---|---|---|---|---|
Priority: | Normal (Code 4) | Due date: | ||
Assignee: | - | % Done: | 0% | |
Category: | - | |||
Target version: | - |
Description
This situation later causes in System-V mode to remove process RQ addr:
Code block:
/* Register stuff in shared memory! */ if (use_sem) { #ifdef EX_USE_SYSVQ ret=ndrx_shm_install_svc(entry->svc_nm, 0, ndrx_epoll_resid_get()); #else ret=ndrx_shm_install_svc(entry->svc_nm, 0, G_server_conf.srv_id); #endif } /* Release semaphore! */ if (use_sem) ndrx_unlock_svc_op(__func__); /* ###################### CRITICAL SECTION, END ########################## */ if (EXSUCCEED!=ret) { NDRX_LOG(log_error, "Service shared memory full - currently ignore error!"); ret=EXSUCCEED; }
Only needs to analyse how it would correlate with epoll mode, is it used at all there? Or only affected for poll / system-v modes?
History
#1 Updated by Madars almost 3 years ago
Another issue with System V - even NDRX_SVCMAX is set to large number and booting the same large number of servers (for example 3000), under psvc -r only 512 resources appear. Others are left empty.
$ xadmin psvc -r SLOT SERVICE NAME NSRV FLAGS CSRVS TCLST CMAX CNODES ------ ------------ ---- ----- ----- ----- ---- -------------------------------- 18210 EXBENCH 4K 1 0 0 0 00000000000000000000000000000000 RES NO IDENTIFIER SERVERS ------ ---------- ------- 506 2099140 1 507 2099131 1 508 2099122 1 509 2099113 1 510 2099104 1 511 2099095 1 512 1667789686 0 513 0 0 514 0 0 515 0 0 516 0 0 517 0 0 518 0 0 519 0 0 520 0 0 521 0 0 522 0 0 523 0 0
#2 Updated by Lauris almost 3 years ago
Issue with:
512 1667789686 0 513 0 0
is related with fact of the:
typedef struct { command_reply_t rply; int slot; /**< Position in SHM */ char service[MAXTIDENT+1]; /**< name of the service */ int srvs; /**< Count of servers advertising this service*/ int flags; /**< service flags */ int csrvs; /**< Number of advertises in cluster */ int totclustered; /**< Total clustered nodes */ int cnodes_max_id; /**< Max id of cluster nodes in list (for fast search) */ cnodeinfo_t cnodes[CONF_NDRX_NODEID_COUNT]; /**< List of cluster nodes */ /**< Server ID (fixed number xadmin output) */ ndrx_shm_resid_t resids[CONF_NDRX_MAX_SRVIDS_XADMIN]; int resnr; /**< Number of local resources */ } command_reply_shm_psvc_t;
CONF_NDRX_MAX_SRVIDS_XADMIN constant. Probably needs to be reworked to have resids dynamically allocated for full listing.