Project

General

Profile

WServer takes almost 2 minutes to start after system reboot

Added by Lukáš Kopernický about 1 year ago

Hello, everyone.

We have this problem with our Wt app - let's call it ConfigIMX.
When I reboot the system, the web is unavailable for 2 minutes.
I checked right after the reboot, if it’s running. Process “ConfigIMX” is running fine.
2 minutes pass and it works normally.

When I restart the app after those 2 minutes, it runs OK right away.

I checked the Wt log. Looks like right after the reboot, it takes wthttp server almost 2 minutes to start:
[2023-Mar-24 09:52:11.937] 514 - [info] "config: reading Wt config file: ./wt_config.xml (location = './ConfigIMX')"
[2023-Mar-24 09:52:11.941] 514 - [info] "WServer/wthttp: initializing built-in wthttpd"
[2023-Mar-24 09:53:58.429] 514 - [info] "wthttp: started server: http://0.0.0.0:80"

When I restart the app after those 2 minutes, wthttp server starts right away:
[2023-Mar-24 09:54:47.708] 544 - [info] "config: reading Wt config file: ./wt_config.xml (location = './ConfigIMX')"
[2023-Mar-24 09:54:47.709] 544 - [info] "WServer/wthttp: initializing built-in wthttpd"
[2023-Mar-24 09:54:47.718] 544 - [info] "wthttp: started server: http://0.0.0.0:80"

I checked other network services (ssh, sftp) and other network apps after the OS reboot... everything is running OK.
Does anyone have a clue, what's the cause of this? Could it be some kind of resolver issue in OS or something like that?

Thank you.
Lukas Kopernicky


Replies (1)

RE: WServer takes almost 2 minutes to start after system reboot - Added by Lukáš Kopernický about 1 year ago

Hello.
So I got some updates, in case anyone's interested.

In dmesg we noticed this entry:
[ 124.382484] random: crng init done
[ 124.390444] random: 7 urandom warning(s) missed due to ratelimiting

This is what we found out about that:
https://www.linode.com/community/questions/17915/why-did-my-server-miss-urandom-warnings-due-to-rate-limiting
These messages are the result of a bug that exhausts the entropy pool on your system.
This can cause delays in how quickly sshd (and maybe other services) become(s) available after boot.

So, we tried to compile Wt 4.9.1 and we disabled "ENABLE_SSL" option (ccmake), since we don't use ssl.
And it works. The Wt app now starts after the reboot as it's supposed to.
We're not totally sure if disabling the "ENABLE_SSL" option is the thing that helped, but this is what we've done so far.

    (1-1/1)