skalenetwork / skaled

Running more than 20 production blockchains, SKALED is Ethereum-compatible, high performance C++ Proof-of-Stake client, tools and libraries. Uses SKALE consensus as a blockchain consensus core. Includes dynamic Oracle. Implements file storage and retrieval as an EVM extension.
https://skale.network
GNU General Public License v3.0
84 stars 40 forks source link

lws adds additional 30 seconds to skaled stopping time #1503

Open dimalit opened 1 year ago

dimalit commented 1 year ago

When exiting gracefully (e.g. by SIGTERM):

  1. SkaleRelayWS::stop() works 30 sec;
  2. SkaleRelayWS::waitWhileInLoop() works 30 sec;
  3. SkaleRelayWS::run() is exiting 30 sec;
  4. it happens because of slow call to server::poll()->server_api_::poll()->server_api::service_poll()->::lws_service() call

Probably, ::lws_service doesn't repsect timeout of 1 sec, which is passed to it, and instead, uses timeout of 30 sec.

We need to decide if this is needed behavior, and if it's not - change it.

dimalit commented 1 year ago

Related to https://github.com/skalenetwork/internal-support/issues/554