Server Extension for JupyterLab runnning in an image spawned on JupyterHub get continuosly gateway errors

Hi everybody,

I created a server extension for jupyterlab to manage python dependencies (GitHub - thoth-station/jupyterlab-requirements: JupyterLab Extension for dependency management and optimization). Locally everything seems to work fine. When I use the same extension on an image spawned in JupyterHub when performing some of the actions (e.g. lock dependencies) the task sometimes fails due to 504 timeout gateway errors.

The logic uses:

import { ServerConnection } from '@jupyterlab/services';
ServerConnection.makeRequest() as the method used to run certain task for the server extension handler, is there a way to increase gateway timout to avoid those errors?

Thank you