Realize is the #1 Golang Task Runner which enhance your workflow by automating the most common tasks and using the best performing Golang live reloading.
GNU General Public License v3.0
4.46k
stars
230
forks
source link
realize. file upload. No obvious error prompt #271
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()
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
I used it https://github.com/oxequa/realize
That's the problem I tried
The above operation will not be a problem The key is that the above documents are special I didn't find any problems with other documents
use https://github.com/oxequa/realize Problems encountered
.realize.yaml