fiber icon indicating copy to clipboard operation
fiber copied to clipboard

🐛 [Bug]: fiber prefork on windows

Open LoryPelli opened this issue 1 year ago • 12 comments

Bug Description

it cause issue in the terminal

How to Reproduce

Create a fiber http server with prefork enable and try to start it

Expected Behavior

it should show fiber startup message, instead it starts to printing randoms things with randoms letters and numbers

Fiber Version

2.52.5

Code Snippet (optional)

No response

Checklist:

  • [X] I agree to follow Fiber's Code of Conduct.
  • [X] I have checked for existing issues that describe my problem prior to opening this one.
  • [X] I understand that improperly formatted bug reports may be closed without explanation.

LoryPelli avatar Aug 24 '24 10:08 LoryPelli

Thanks for opening your first issue here! 🎉 Be sure to follow the issue template! If you need help or want to chat with us, join us on Discord https://gofiber.io/discord

welcome[bot] avatar Aug 24 '24 10:08 welcome[bot]

image image image

LoryPelli avatar Aug 24 '24 10:08 LoryPelli

without prefork it works as expected https://github.com/lorypelli/server

LoryPelli avatar Aug 24 '24 10:08 LoryPelli

Isnt prefork a Linux feature?

gaby avatar Aug 24 '24 14:08 gaby

Isnt prefork a Linux feature?

eh? On linux it doesn't seem to happen

LoryPelli avatar Aug 24 '24 14:08 LoryPelli

@lorypelli Try a simple server with prefork and a GET router without using https://github.com/pterm/pterm

The weird text you are seeing is related to pterm not fiber

gaby avatar Aug 24 '24 14:08 gaby

@lorypelli Try a simple server with prefork and a GET router without using https://github.com/pterm/pterm

The weird text you are seeing is related to pterm not fiber

But why does it work without prefork enabled?

LoryPelli avatar Aug 24 '24 14:08 LoryPelli

I'm not sure, prefork will run multiple processes using the same port. Maybe that affects pterm?

Try it without pterm first to confirm it works without it

gaby avatar Aug 24 '24 14:08 gaby

@lorypelli Were you able to solve your issue?

gaby avatar Sep 06 '24 11:09 gaby

image Actually it may be related to the encoding of your language, you can try something like utf-8.

This program runs on my windows terminal without any problems.

Skyenought avatar Sep 08 '24 17:09 Skyenought

image Actually it may be related to the encoding of your language, you can try something like utf-8.

This program runs on my windows terminal without any problems.

Is prefork enabled? If not, try enabling it

LoryPelli avatar Sep 08 '24 17:09 LoryPelli

ok, i found my mistake

Skyenought avatar Sep 09 '24 05:09 Skyenought

@lorypelli Was this issue solved for you?

gaby avatar Dec 20 '24 04:12 gaby

@lorypelli Was this issue solved for you?

I'm not using prefork as of right now, but I asked a question in the discord server in the v2 channel about making a custom logger, could you please check and see if you could help? (https://discord.com/channels/704680098577514527/1319014064852176966) Thanks

LoryPelli avatar Dec 20 '24 05:12 LoryPelli