Feature Request: Extend the forge tunnel timeout

Context & Problem: Currently, debugging backend Forge functions is a frustrating developer experience because it’s a race against time to attach a debugger. The standard 25-second execution limit is often triggered before a developer can successfully attach the debugger, step through the code, and inspect complex logic.

Proposed Solution: Introduce a way to instruct the forge tunnel command to allow for a longer timeout. This could be achieved via a new CLI flag (e.g., forge tunnel --debug-timeout 120) or an environment variable.

Acceptance Criteria & Constraints:

  • Local environment only: This extended timeout functionality must only apply when running forge tunnel.

  • Strictly NO manifest changes: The standard 25-second delay is reasonable and necessary for production. This ticket should not alter the manifest or affect production execution limits in any way.

Best,

Mathias

Hi @MathiasCostaMagnusse – Welcome! :waving_hand:

Just double-checking: Are you using the debugger mode of the Forge tunnel? In this mode, the tunnel listens indefinitely on a configured port number for a debugger to attach.

forge tunnel --debug --debugFunctionHandlers index.handler --debugStartingPort 9229

In this mode, you should have plenty of time to attach the debugger, invoke a function, hit the break point, and step through your code.

The only 25-second time limit will be for having the results of your function processed when it returns.

image

Maybe that’s what you’re experiencing, but your feature request mentions that you don’t have a reasonable amount of time to attach the debugger and step through your code. I don’t think that should be much of a problem using the debug port.

Here’s the basic tutorial using Visual Studio Code:

Hello Aaron,

thank you for the detailed response!

Yes, im using the: forge tunnel --debug --debugFunctionHandlers index.handler --debugStartingPort 9229

I am however using intelliJ (which souldnt be an issue)

Its specifically when querying atlassians endpoint. im getting this error:
Error: Network request can not be made: Forge proxy authorization expired 10 seconds ago. It’s likely caused by code from a previous function invocation still running. Please ensure that all promises in your code are properly awaited.

So yes, technically im able to have my debugger and inspect values, but if i work with external data that is fetched at runtime after the timeout happened, then the program will halt at the next outgoing endpoint.

Best,
Mathias

Hi @MathiasCostaMagnusse – That makes sense. Thank you for the clarification.

Yes, the API authorization token associated with the invocation has its own timeout value. An Atlassian describes it here:

But I’m not seeing a 60-second timeout as described above. It seems like it’s more like 35 seconds. (Maybe they changed it within the last year?)

I suggest submitting your feature request to the Forge Jira project. (That’s what Atlassian recommends.) Then drop a link to your feature request in the forum here so other developers can vote for it if they want.

Note: I also suggest including the error message about the Forge proxy authorization expiration in the feature request. That makes the problem super specific. :slightly_smiling_face:

Gotcha, i have filed a feature request on that page. hope it amounts to something :sweat_smile:

i wish you a good day!

Thanks for the helpful answers, @AaronMorris1 !

hi @MathiasCostaMagnusse - what was the issue ID of the feature request you submitted? I am happy to review and see if your request enhancement is feasible.

Hello Joe,

This is the link to the request:

so i would assume the issue id would be FRGE-2156?

Best,

Mathias