Back

How to upgrade the bun version in runtime

  • 1
  • Self Hosted
  • Functions
erikkamalov
2 Jan, 2024, 17:01

After some analysis about the timeout during the execution of functions, I'm getting older and bun server is not the latest version. I think it is possible to update the bun version to the latest one, it is possible to solve the problem.

TL;DR
The user is experiencing issues with the bun version in their runtime and wants to upgrade it. They mention some specific bugs they have encountered and provide links for further reference. They suggest upgrading to bun version 1.1 or 1.0.20 as it has fixed bugs and offers Windows support. They believe that updating the bun version will solve the problem for many developers. The user explains that the error is difficult to catch and causes the infrastructure to fail. They suspect the error occurs when a new appwrite execution is created. Testing the functions locally with the bun server works fine for them. The user mentions they wanted to launch their project
erikkamalov
2 Jan, 2024, 17:02
erikkamalov
2 Jan, 2024, 17:03

https://discord.com/channels/564160730845151244/1185934883009335376 @Mosh Ontong Here, a colleague is also having a problem with this. He says he only experiences it with bun

erikkamalov
2 Jan, 2024, 17:04

@Core

D5
2 Jan, 2024, 17:07

Not needed to pin core 😅

D5
2 Jan, 2024, 17:09

For now the only supported version is Bun 1.0

D5
2 Jan, 2024, 17:29

Could you please give some more context on the error?

Eldad
2 Jan, 2024, 17:32

We tend to update runtimes versions between minor releases. @dlohani could take a look and see if we can upgrade it in 1.5

erikkamalov
2 Jan, 2024, 17:33

Sorry

erikkamalov
2 Jan, 2024, 17:51

The error is very hidden and not clear, it is very difficult to catch. I spent 4-5 days trying to catch the error. The bottom line is that in some cases, when calling a function, it feels like the entire infrastructure is falling down. When this happens, even the appwrite console stops working. The duration of the error depends directly on the timeout duration of the function.

I suspect that the problem arises precisely when a new appwrite execution is created.

We also observe that the function is executed successfully, but the response is not returned, after the completion of the function, the response is lost somewhere in the bun server. Thus, a timeout occurs. We have checked all the functions for a response, they are all working properly.

When we test the local functions by launching the bun server, everything works fine for us.

We wanted to launch our project happy new year, but experienced a problem with the timeout. We have a project of about 4 functions written in typescript with bun.

erikkamalov
2 Jan, 2024, 17:53

It seems to me that if we solve the problem with this, it would be useful for many people. Many developers want to experience Bun server.

D5
2 Jan, 2024, 17:59

I see. Could be a bun specific issue as said

erikkamalov
2 Jan, 2024, 18:03

Therefore, offering to raise the issue of updating bun to version 1.0.20, this is the most up-to-date version.

erikkamalov
2 Jan, 2024, 18:04

Perhaps this will solve the problem of many faster than waiting for version 1.5

Mosh Ontong
3 Jan, 2024, 03:22

I hope we can upgrade the bun on 1.1 as they will release windows support and fixed numerous bugs

https://x.com/jarredsumner/status/1739592098498957470?s=46

Mosh Ontong
3 Jan, 2024, 03:26

and also I have been encountering some bun bugs for example this

https://github.com/oven-sh/bun/issues/4983

Now in the latest of bun version they fixed it. And some genererating crypto or nanoid . Got an error but relates on bun problem. I hope that when 1.1 have been released the bun run time in appwrite will also be updated

Mosh Ontong
3 Jan, 2024, 03:28

I totally agree with “We also observe that the function is executed successfully, but the response is not returned after the completion…” I also experience this one

Mosh Ontong
3 Jan, 2024, 03:29

@erikkamalov If you are running out of time. You can convert your bun into node js. It just takes short time to convert it. Thats what I did

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more