And the service seems to be all right, no error prompt, no crash error prompt, it seems to be all right!!!
When I access this interface for the second time, return Error: connect ECONNREFUSED 127.0.0.1:8080
At this time, golang still looks very healthy, but he can't work any more
[09:51:43][EPDS] : [GIN-debug] DELETE /v1/field/testing/:id --> epds/apis/v1/controllers.TestingFieldDelete (5 handlers)
[09:51:43][EPDS] : [GIN-debug] Listening and serving HTTP on 0.0.0.0:8080
Then I found out where the problem was.
I debug the code.
// file, store in memory or on disk
fh := &FileHeader{
Filename: filename,
Header: p.Header,
}
n, err := io.CopyN(&b, p, maxMemory+1)
fmt.Println(err, "eeeeeeeeeeeeeeeeeeeeeeeeeeeeee")
if err != nil && err != io.EOF {
return nil, err
}
fmt.Println("qqqqqqqqqqqqqqqqqqqqq")
fmt.Println(b.Bytes(), "bbbbbbbbbbbbbbbbbbbbb")
fmt.Println("The process has collapsed")
output
[09:57:19][EPDS] : [GIN-debug] Listening and serving HTTP on 0.0.0.0:8080
[09:57:32][EPDS] : EOF eeeeeeeeeeeeeeeeeeeeeeeeeeeeee
[09:57:32][EPDS] : qqqqqqqqqqqqqqqqqqqqq
The process has collapsed No output !!!!!!!!!!!!!
io.EOF error. Can no longer call b.Bytes()
@cloudmer closing the loop from the Gophers Slack: the Go issue tracker isn't the right place to ask for this kind of help. Feel free to direct your question to the #newbies or #general channels.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes, There is still no solution
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I'm using the HTTP service. use gin https://github.com/gin-gonic/gin I found that it had nothing to do with gin
I'm uploading a special file.
he service didn't respond after I uploaded it.
And the service seems to be all right, no error prompt, no crash error prompt, it seems to be all right!!!
When I access this interface for the second time, return Error: connect ECONNREFUSED 127.0.0.1:8080
At this time, golang still looks very healthy, but he can't work any more
Then I found out where the problem was.
I debug the code.
output
The process has collapsed No output !!!!!!!!!!!!! io.EOF error. Can no longer call b.Bytes()
Now I post my file fileName: test.yaml
What did you expect to see?
I need information remind To help me
What did you see instead?
I didn't see any information