I could solve that problem by changing worker_timeout in config/puma.rb.
It seems that problem is already solved in new rails 6.1 projects using these lines:
# Specifies the `worker_timeout` threshold that Puma will use to wait before
# terminating a worker in development environments.
#
worker_timeout 3600 if ENV.fetch("RAILS_ENV", "development") == "development"
Default is 90 seconds.
The puma documentation says:
Verifies that all workers have checked in to the master process within the given timeout. If not the worker process will be restarted. This is not a request timeout, it is to protect against a hung or dead process. Setting this value will not protect against slow requests.
https://www.rubydoc.info/gems/puma/Puma%2FDSL:worker_timeout