Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Andrea Spacca
    @aspacca
    it is strange that one ReadAll doesn't crash
    the one in the previewhandler
    and the one in get handler yes
    one takes the io.Reader from the storage
    the other the io.TeeReader wrapping the io.Reader from the storage
    kiska3
    @kiska3
    ¯_(ツ)_/¯
    kiska3
    @kiska3
    Yeah I am just going to let the server restart itself if it crashes. Meh
    Andrea Spacca
    @aspacca
    how do you catch the panic?
    I can reproduce in a slightly different way
    on mac
    the strange thing
    is that same content
    one file without content type
    one with
    the one without doesn't crash
    the other yes
    Andrea Spacca
    @aspacca
    yes
    amazing
    can you try upload the same file that crashes with no extension?
    like filename
    then download and see if it crashes
    Andrea Spacca
    @aspacca
    yes
    I confirm
    without content type no crash
    kiska3
    @kiska3
    So I caught the panic because I had users tell me the server was throwing a 502 xD
    I am using nginx to reverse proxy to the transfersh instance because I want to use TLS
    Andrea Spacca
    @aspacca
    you can use TLS directly on transfer.sh
    I mean, where the panic was printed?
    on mac I got a SIGKILL received and no panic
    Andrea Spacca
    @aspacca
    now it works without SIGKILL
    can you run GODEBUG="gctrace=1" go run main.go --listener etc
    ?
    Andrea Spacca
    @aspacca
    GODEBUG="gctrace=1,gcpacertrace=1" would be even better
    Andrea Spacca
    @aspacca
    really hard to debug on docker
    anyway I see the memory allocation
    Andrea Spacca
    @aspacca
    kiska3
    @kiska3
    @aspacca Seems like the issue is fixed, my server isn't crashing on opening or curl with the mp4 and other large files
    Andrea Spacca
    @aspacca
    fixed for .txt in preview as well
    can you try?
    if everything is fine I will merge to master
    kiska3
    @kiska3
    Just that it seems to crash my browser viewing that much content xD
    wget on that file works as well, so I say the issue is fixed
    If you want you can test this out on my instance, just that I'll probably delete the file very soon afterwards since, space.png
    Andrea Spacca
    @aspacca
    well, I limited preview to 5mb
    I can lower
    kiska3
    @kiska3
    Its fine, as long as it doesn't crash the server process I am fine with whatever value you set
    Thank you for fixing the issues, and I know that some of the issues are me just running it on a very small VM aka lightsail
    Andrea Spacca
    @aspacca
    no, it was a real issue
    i totally missed the mix between teereader and readall