I am developing GAE/Go + gin application.
We have now about 25 handlers like this.
func init() {
r := gin.New()
r.POST("/path/to/some1", func1) // ^
r.POST("/path/to/some2", func2) // |
: // | about 25 handlers
r.POST("/path/to/someX", funcX) // v
}
I added another handler funcY
to above code. and I invoked local development server, but it hangs up during start up.
func init() { // Hang up during start up.
r := gin.New()
r.POST("/path/to/some1", func1)
r.POST("/path/to/some2", func2)
:
r.POST("/path/to/someX", funcX)
r.POST("/path/to/someY", funcY)
}
The console log is as below. No message after this.
"C:\Program Files (x86)\JetBrains\Gogland 171.3780.106\binunnerw.exe" C:/go_appengine\goapp.bat serve C:/path/to/app.yaml
INFO 2017-05-26 15:03:02,552 devappserver2.py:764] Skipping SDK update check.
INFO 2017-05-26 15:03:02,996 api_server.py:268] Starting API server at: http://localhost:56094
INFO 2017-05-26 15:03:03,000 dispatcher.py:199] Starting module "default" running at: http://localhost:8080
INFO 2017-05-26 15:03:03,000 admin_server.py:116] Starting admin server at: http://localhost:8000
funcY
has no problem because when I remove func1
, it starts up normally.
func init() { // This works without problem.
r := gin.New()
r.POST("/path/to/some2", func2)
:
r.POST("/path/to/someX", funcX)
r.POST("/path/to/someY", funcY)
}
Does gin have maximum number of handler? If so, how can I raise it? Or do I have another way to solve this?
[UPDATE] This looks to be the local development server problem. When I deployed to the actual GAE, my app works without problem. How can I solve this problem in the local development server?