Connection getting killed off

Hello,
I am working on a plugin for Discourse, called Disraptor, which works as a kind of reverse proxy to allow embedding another website into the Discourse context.

The website which should be embedded for us this way currently needs a long time to serve certain routes. Therefore a rendered “not_found” is received after 30 seconds.

Now I am aware, that the standard timeout for unicorn workers is 30 seconds in production environment. So I started with increasing this timeout by changing the unicorn config. Looking at the unicorn error log I can confirm that the unicorn worker gets killed later now but still the not_found template is getting rendered (before the worker gets killed off).

After more searching I was not able to find any clue where this 30 second timeout comes from or where it’s set. Even though the long serving time is an issue for itself and will probably get fixed in the future, right now it would be perfect if there was a possibiltity to change that timeout.
Does anyone have an idea how that might work?

Thank you in advance!