hypnotoad server timeout issue

The hypnotoad server is a prefolk server used for deployment in Mojolicious production environments.

If you are developing with morbo in your development environment and you want to run your application in production, you need to be aware of timeouts.

hypnotoad is a pre-fork server that has a mechanism to stop child processes that have not responded for a certain period of time.

Therefore, if you execute an HTTP request that takes more than 30 seconds, it will not be possible to execute it.

Time-out mechanism

Heartbeat

The hynotoad parent process monitors the survival of child processes. By default, if there is a process that has not responded for 5 seconds, the child process is instructed to stop as soon as the request is completed.

If the request is not completed within another 30 seconds, it will be forced to stop the process. In other words, by default, you cannot receive requests longer than 35 seconds.

When writing a blocking application, you need to set a long heartbeat timeout value.

If hypnotoad has a file called hypnotoad.conf in the same directory, it will be read as a configuration file, so set the heartbeat timeout as follows, for example.

# hypnotoad.conf
{heartbeat_timeout => 60}

Go to Mojolicious Reference

Associated Information