Comments (2)
Trying to Debug.
Using a fmt.Println() in the server to diagnose what might be the issue.
func main() {
err := godotenv.Load()
// Hub Runner
go chat.HubRunner()
if os.Getenv("APP_ENV") == "development" {
if err != nil {
fmt.Println("Error loading .env file")
}
}
app := fiber.New(*getConfig())
fmt.Println("Server Instance: ", app)
api := app.Group("/api", routes.GetNextMiddleWare)
This is the output for the code.
2022-05-08T00:11:04.780696+00:00 app[web.1]: Server Instance: &{{0 0} [[] [] [] [] [] [] [] [] []] [map[] map[] map[] map[] map[] map[] map[] map[] map[]] false 0 0 {{} <nil> 0 <nil> 0 0x7e27c0} 0xc000296fc0 {true iMon false false true false false 4194304 262144 0xc00020e240 false 0 0 0 4096 4096 .fiber.gz false 0x7e25a0 false false false false false Go-Chat false false false 0x696cc0 0x6902c0 tcp4 false [] map[] [] false} 0x7e2760 0x7e2700 map[:0xc00023c780] 0xc00012de00 0xc0002a0000 0xc0002274a0}
2022-05-08T00:11:04.809004+00:00 app[web.1]: Server Instance: &{{0 0} [[] [] [] [] [] [] [] [] []] [map[] map[] map[] map[] map[] map[] map[] map[] map[]] false 0 0 {{} <nil> 0 <nil> 0 0x7e27c0} 0xc000296fc0 {true iMon false false true false false 4194304 262144 0xc00020e2d0 false 0 0 0 4096 4096 .fiber.gz false 0x7e25a0 false false false false false Go-Chat false false false 0x696cc0 0x6902c0 tcp4 false [] map[] [] false} 0x7e2760 0x7e2700 map[:0xc00023e780] 0xc00012dea0 0xc0002a0000 0xc0002294a0}
2022-05-08T00:11:04.823391+00:00 app[web.1]: Server Instance: &{{0 0} [[] [] [] [] [] [] [] [] []] [map[] map[] map[] map[] map[] map[] map[] map[] map[]] false 0 0 {{} <nil> 0 <nil> 0 0x7e27c0} 0xc0001fefc0 {true iMon false false true false false 4194304 262144 0xc0000f8240 false 0 0 0 4096 4096 .fiber.gz false 0x7e25a0 false false false false false Go-Chat false false false 0x696cc0 0x6902c0 tcp4 false [] map[] [] false} 0x7e2760 0x7e2700 map[:0xc00000c960] 0xc0000a3cc0 0xc000208000 0xc0001914a0}
2022-05-08T00:11:04.823872+00:00 app[web.1]: Server Instance: &{{0 0} [[] [] [] [] [] [] [] [] []] [map[] map[] map[] map[] map[] map[] map[] map[] map[]] false 0 0 {{} <nil> 0 <nil> 0 0x7e27c0} 0xc0001fcfc0 {true iMon false false true false false 4194304 262144 0xc0000f8240 false 0 0 0 4096 4096 .fiber.gz false 0x7e25a0 false false false false false Go-Chat false false false 0x696cc0 0x6902c0 tcp4 false [] map[] [] false} 0x7e2760 0x7e2700 map[:0xc00000c960] 0xc0000a3d60 0xc000208000 0xc0001914a0}
2022-05-08T00:11:04.825754+00:00 app[web.1]: Server Instance: &{{0 0} [[] [] [] [] [] [] [] [] []] [map[] map[] map[] map[] map[] map[] map[] map[] map[]] false 0 0 {{} <nil> 0 <nil> 0 0x7e27c0} 0xc00021efc0 {true iMon false false true false false 4194304 262144 0xc0000fc240 false 0 0 0 4096 4096 .fiber.gz false 0x7e25a0 false false false false false Go-Chat false false false 0x696cc0 0x6902c0 tcp4 false [] map[] [] false} 0x7e2760 0x7e2700 map[:0xc0001c8780] 0xc0000b9cc0 0xc00022a000 0xc0001b34a0}
2022-05-08T00:11:04.826879+00:00 app[web.1]: Server Instance: &{{0 0} [[] [] [] [] [] [] [] [] []] [map[] map[] map[] map[] map[] map[] map[] map[] map[]] false 0 0 {{} <nil> 0 <nil> 0 0x7e27c0} 0xc0002a0fc0 {true iMon false false true false false 4194304 262144 0xc00017a240 false 0 0 0 4096 4096 .fiber.gz false 0x7e25a0 false false false false false Go-Chat false false false 0x696cc0 0x6902c0 tcp4 false [] map[] [] false} 0x7e2760 0x7e2700 map[:0xc000248780] 0xc000133d60 0xc0002aa000 0xc0002314a0}
2022-05-08T00:11:04.827098+00:00 app[web.1]:
2022-05-08T00:11:04.828433+00:00 app[web.1]: ┌───────────────────────────────────────────────────┐ ┌───────────────────────────────────────────────────┐
2022-05-08T00:11:04.828930+00:00 app[web.1]: │ Go-Chat │ │ Child PIDs ... 11, 12, 16, 19, 22, 28, 30, 48 │
2022-05-08T00:11:04.829858+00:00 app[web.1]: │ Fiber v2.32.0 │ └───────────────────────────────────────────────────┘
2022-05-08T00:11:04.830107+00:00 app[web.1]: │ http://127.0.0.1:33230 │
2022-05-08T00:11:04.830350+00:00 app[web.1]: │ (bound on host 0.0.0.0 and port 33230) │
2022-05-08T00:11:04.830621+00:00 app[web.1]: │ │
2022-05-08T00:11:04.830857+00:00 app[web.1]: │ Handlers ............ 31 Processes ........... 8 │
2022-05-08T00:11:04.831220+00:00 app[web.1]: │ Prefork ........ Enabled PID ................. 4 │
2022-05-08T00:11:04.831757+00:00 app[web.1]: └───────────────────────────────────────────────────┘
2022-05-08T00:11:04.831759+00:00 app[web.1]:
2022-05-08T00:11:04.834929+00:00 app[web.1]: Server Instance: &{{0 0} [[] [] [] [] [] [] [] [] []] [map[] map[] map[] map[] map[] map[] map[] map[] map[]] false 0 0 {{} <nil> 0 <nil> 0 0x7e27c0} 0xc000274fc0 {true iMon false false true false false 4194304 262144 0xc000170240 false 0 0 0 4096 4096 .fiber.gz false 0x7e25a0 false false false false false Go-Chat false false false 0x696cc0 0x6902c0 tcp4 false [] map[] [] false} 0x7e2760 0x7e2700 map[:0xc00000c960] 0xc00011bcc0 0xc000280000 0xc0002094a0}
2022-05-08T00:11:04.843197+00:00 app[web.1]: Server Instance: &{{0 0} [[] [] [] [] [] [] [] [] []] [map[] map[] map[] map[] map[] map[] map[] map[] map[]] false 0 0 {{} <nil> 0 <nil> 0 0x7e27c0} 0xc000296fc0 {true iMon false false true false false 4194304 262144 0xc00020e240 false 0 0 0 4096 4096 .fiber.gz false 0x7e25a0 false false false false false Go-Chat false false false 0x696cc0 0x6902c0 tcp4 false [] map[] [] false} 0x7e2760 0x7e2700 map[:0xc00023e780] 0xc00012dea0 0xc0002a2000 0xc0002294a0}
2022-05-08T00:11:04.856203+00:00 app[web.1]: Server Instance: &{{0 0} [[] [] [] [] [] [] [] [] []] [map[] map[] map[] map[] map[] map[] map[] map[] map[]] false 0 0 {{} <nil> 0 <nil> 0 0x7e27c0} 0xc000270fc0 {true iMon false false true false false 4194304 262144 0xc000170240 false 0 0 0 4096 4096 .fiber.gz false 0x7e25a0 false false false false false Go-Chat false false false 0x696cc0 0x6902c0 tcp4 false [] map[] [] false} 0x7e2760 0x7e2700 map[:0xc00000c960] 0xc00011bd60 0xc00027e000 0xc0002094a0}
from heroku-buildpack-go.
Hi, it looks like you have Prefork
enabled in your fiber settings, which will spawn multiple Go processes. Your logs look as I would expect in that mode. You may want to turn off prefork if that's not what you want. More details here: https://docs.gofiber.io/api/fiber#config.
This doesn't seem like an issue with the buildpack, though. For issues running your app on Heroku, support.heroku.com is your best bet.
from heroku-buildpack-go.
Related Issues (20)
- Go 1.15
- Allow specifying the golangci-lint version
- Custom build tags HOT 1
- Builds failing on Go 1.16rc1 HOT 3
- Error decompressing go1.15.8.linux-amd64.tar.gz HOT 2
- Push rejected, failed to compile Go app. HOT 10
- Failed to compile Go app without vendor on Go 1.16 HOT 4
- Way to set GO111MODULE for 1.16?
- Custom Vendoring doesnt work!
- go: command not found HOT 4
- go_pre_compile does not work HOT 2
- Error decompressing go1.16.10.linux-amd64.tar.gz HOT 2
- Requested file unknown to the buildpack HOT 5
- Add Go 1.18.6 and 1.19.1
- go cmd unavailable for go-pre-compile or go-post-compile HOT 1
- Add Go 1.20
- build fails on specific packages - go1.20
- Go 1.21.1 is released!
- Go 1.22 was released on 07.02.2024
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from heroku-buildpack-go.